Skip to content

Commit

Permalink
apt-get: Simplify -t and friends completion, support Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Mar 17, 2018
1 parent d623786 commit 9b531a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions completions/apt-get
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ _apt_get()
return
;;
-t|--target-release|--default-release)
COMPREPLY=( $( apt-cache policy | \
command grep "release.o=Debian,a=$cur" | \
command sed -e "s/.*a=\(\w*\).*/\1/" | uniq 2> /dev/null) )
COMPREPLY=( $( compgen -W "$( apt-cache policy | command sed -ne \
's/^ *release.*[ ,]o=\(Debian\|Ubuntu\),a=\(\w*\).*/\2/p' )" \
-- "$cur" ) )
return
;;
esac
Expand Down

0 comments on commit 9b531a0

Please sign in to comment.