Skip to content

Commit

Permalink
Nicer solution to escape zsh completions, refs #382
Browse files Browse the repository at this point in the history
  • Loading branch information
nonZero authored and agnivade committed Jul 31, 2022
1 parent 3ce8333 commit ae67940
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/completion/zsh/_tldr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#compdef tldr

local -a pages oses
pages=$(for cmd in $(tldr -a1); do echo ${(q)cmd}; done)
pages=$(tldr -a1)
oses='( linux osx sunos windows )'

_arguments \
Expand All @@ -22,4 +22,4 @@ _arguments \
'--windows[override operating system with Windows]' \
'(- *)'{-u,--update}'[update local cache]' \
'(- *)'{-c,--clear-cache}'[clear local cache]' \
"*:page:(${pages})" && return 0
"*:page:(${(b)pages})" && return 0

0 comments on commit ae67940

Please sign in to comment.