diff options
| author | Zhiming Wang | 2016-09-29 08:42:09 -0400 |
|---|---|---|
| committer | GitHub | 2016-09-29 08:42:09 -0400 |
| commit | 8608e48f09a5daa1de6f8243ad33f38f14ae6f2e (patch) | |
| tree | 4a35d4e426612de327dce47316dfb21460bedc4f | |
| parent | de5deaea986a82daf5924791cfb9224a6a88b29a (diff) | |
| parent | 09c04aa7155ee567f58e2b2285868bb81ce973c9 (diff) | |
| download | brew-8608e48f09a5daa1de6f8243ad33f38f14ae6f2e.tar.bz2 | |
Merge pull request #901 from elyscape/use-command-ls
completion: Avoid aliases with `command ls`
| -rw-r--r-- | completions/bash/brew | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/completions/bash/brew b/completions/bash/brew index 67c4c6a3d..b1abe3855 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -52,7 +52,7 @@ __brew_complete_formulae() { __brew_complete_installed() { local cur="${COMP_WORDS[COMP_CWORD]}" - local inst="$(ls "$(brew --cellar)")" + local inst="$(command ls "$(brew --cellar)" 2>/dev/null)" COMPREPLY=($(compgen -W "$inst" -- "$cur")) } @@ -71,7 +71,7 @@ __brew_complete_versions() { __brew_complete_logs() { local cur="${COMP_WORDS[COMP_CWORD]}" - local logs="$(ls "${HOMEBREW_LOGS:-~/Library/Logs/Homebrew/}")" + local logs="$(command ls "${HOMEBREW_LOGS:-${HOME}/Library/Logs/Homebrew/}" 2>/dev/null)" COMPREPLY=($(compgen -W "$logs" -- "$cur")) } |
