mirror of
https://github.com/beetbox/beets.git
synced 2026-01-15 04:34:23 +01:00
Make command filtering in zsh completion more robust.
- Filter out any lines that don't resemble a command in the help text. - Fixes #1525.
This commit is contained in:
parent
f4a124e7e2
commit
f031ce581b
1 changed files with 1 additions and 1 deletions
|
|
@ -154,7 +154,7 @@ function _beet_subcmd_options()
|
|||
# Now build the arguments to _regex_arguments for each subcommand.
|
||||
local -a options regex_words_subcmds regex_words_help
|
||||
local subcmd cmddesc
|
||||
for i in ${${(f)"$(beet help | awk 'f;/Commands:/{f=1}')"[@]}[@]}
|
||||
for i in ${${(f)"$(beet help | awk 'f;/Commands:/{f=1}' | grep '^ \w.*')"[@]}[@]}
|
||||
do
|
||||
subcmd="${i[(w)1]}"
|
||||
cmddesc="${${${${${i[(w)2,-1]##\(*\) #}//:/-}//\[/(}//\]/)}//\'/}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue