Skip to content

Commit

Permalink
mysql, puppet: sed portability fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Feb 25, 2016
1 parent 536d79f commit f8b0828
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion completions/mysql
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;

Expand Down
6 changes: 3 additions & 3 deletions completions/puppet
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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" ) )
}

Expand All @@ -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" ) )
}

Expand Down

0 comments on commit f8b0828

Please sign in to comment.