From 910e531c71c2a57504f0c1dc0113d8ae13cee7c5 Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Tue, 10 Dec 2019 10:39:39 +0100 Subject: [PATCH 4/7] Use _deb_codenames to fetch distribution list in _sbuild --- Completion/Debian/Command/_sbuild | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Completion/Debian/Command/_sbuild b/Completion/Debian/Command/_sbuild index 5796ed827..469fe5336 100644 --- a/Completion/Debian/Command/_sbuild +++ b/Completion/Debian/Command/_sbuild @@ -1,18 +1,8 @@ #compdef sbuild _deb_distributions() { - local suite stable - suite="" - - # Get stable, oldstable and oldoldstable - if [ -f /usr/share/distro-info/debian.csv ]; then - stable="$(grep -E '^[^,]*(,[^,]*){4}$' /usr/share/distro-info/debian.csv | - tail -n 1 | cut -d ',' -f 3)" - suite=($(grep -B 2 -F ",${stable}," /usr/share/distro-info/debian.csv | - cut -d ',' -f 3)) - fi - - compadd "$@" -- "${suite[@]}" unstable experimental + _deb_codenames + compadd "$@" -- unstable } _get_identity() { -- 2.24.0