diff --git a/completions/mysql b/completions/mysql index 66388b2f8bf..f08d9574fac 100644 --- a/completions/mysql +++ b/completions/mysql @@ -21,7 +21,7 @@ _mysql() ;; --default-character-set) [[ -d /usr/share/mysql/charsets ]] && \ - COMPREPLY=( $( compgen -W "$(command ls /usr/share/mysql/charsets | command sed -e '/^\(README\|Index\.xml\)$/d' -e 's/.xml$//') utf8" -- "$cur" ) ) + COMPREPLY=( $( compgen -W "$(command ls /usr/share/mysql/charsets | command sed -e '/^README$/d' -e '/^Index\.xml$/d' -e 's/.xml$//') utf8" -- "$cur" ) ) return 0 ;; diff --git a/completions/puppet b/completions/puppet index c8ca6be89f5..31f83a938b4 100644 --- a/completions/puppet +++ b/completions/puppet @@ -22,7 +22,7 @@ _puppet_certs() && puppetca=puppetca if [[ "$1" == --all ]]; then - cert_list=$( $puppetca --list --all | command sed -e 's/^[+-]\?\s*\(\S\+\)\s\+.*$/\1/' ) + cert_list=$( $puppetca --list --all | command sed -e 's/^[+-]\{0,1\}\s*\(\S\+\)\s\+.*$/\1/' ) else cert_list=$( $puppetca --list ) fi @@ -31,7 +31,7 @@ _puppet_certs() _puppet_types() { - puppet_types=$( puppet describe --list | command sed -e 's/^\(\S\+\).*$/\1/' ) + puppet_types=$( puppet describe --list | command sed -e 's/^\(\S\{1,\}\).*$/\1/' ) COMPREPLY+=( $( compgen -W "$puppet_types" -- "$cur" ) ) } @@ -41,7 +41,7 @@ _puppet_references() PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type puppetdoc &>/dev/null \ && puppetdoc=puppetdoc - puppet_doc_list=$( $puppetdoc --list | command sed -e 's/^\(\S\+\).*$/\1/' ) + puppet_doc_list=$( $puppetdoc --list | command sed -e 's/^\(\S\{1,\}\).*$/\1/' ) COMPREPLY+=( $( compgen -W "$puppet_doc_list" -- "$cur" ) ) }