Permalink
Browse files

[shell] fix autocomplete regexp

  • Loading branch information...
hhugo committed Oct 12, 2012
1 parent 712bf51 commit ceed7ffebd90ef1cc3d2f6db887c9f09ecb00a8d
Showing with 2 additions and 2 deletions.
  1. +1 −1 shell/opam_completion.sh
  2. +1 −1 shell/opam_completion_zsh.sh
View
@@ -13,7 +13,7 @@ _opam_global_options()
_opam_commands()
{
local res
- res="$( opam --help 2>/dev/null | grep '^ ' | sed 's/ *//;s/ .*//' | grep -v '^-' )"
+ res="$( opam --help 2>/dev/null | grep '^ [^ ]' | sed 's/ *//;s/ .*//' | grep -v '^-' )"
_opam_add "$res"
}
@@ -13,7 +13,7 @@ _opam_global_options()
_opam_commands()
{
local res
- res="$( opam --help 2>/dev/null | grep '^ ' | sed 's/ *//;s/ .*//' | grep -v '^-' )"
+ res="$( opam --help 2>/dev/null | grep '^ [^ ]' | sed 's/ *//;s/ .*//' | grep -v '^-' )"
_opam_add "$res"
}

0 comments on commit ceed7ff

Please sign in to comment.