diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh index da9781fc4d..07571f79aa 100644 --- a/Library/Contributions/brew_bash_completion.sh +++ b/Library/Contributions/brew_bash_completion.sh @@ -12,7 +12,7 @@ _brew_to_completion() local actions="--cache --config --prefix cat cleanup configure create deps doctor edit home info install link list log outdated prune remove search unlink update uses" - local ext=$(ls $(brew --repository)/Library/Contributions/examples | + local ext=$(\ls $(brew --repository)/Library/Contributions/examples | sed -e "s/\.rb//g" -e "s/brew-//g") COMPREPLY=( $(compgen -W "${actions} ${ext}" -- ${cur}) ) return @@ -29,14 +29,14 @@ _brew_to_completion() case "$prev" in # Commands that take a formula cat|deps|edit|fetch|home|homepage|info|install|log|options|uses) - local ff=$(ls $(brew --repository)/Library/Formula | sed "s/\.rb//g") - local af=$(ls $(brew --repository)/Library/Aliases 2> /dev/null | sed "s/\.rb//g") + local ff=$(\ls $(brew --repository)/Library/Formula | sed "s/\.rb//g") + local af=$(\ls $(brew --repository)/Library/Aliases 2> /dev/null | sed "s/\.rb//g") COMPREPLY=( $(compgen -W "${ff} ${af}" -- ${cur}) ) return ;; # Commands that take an existing brew abv|cleanup|link|list|ln|ls|remove|rm|uninstall|unlink) - COMPREPLY=( $(compgen -W "$(ls $(brew --cellar))" -- ${cur}) ) + COMPREPLY=( $(compgen -W "$(\ls $(brew --cellar))" -- ${cur}) ) return ;; esac