Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nicer solution to escape zsh completions, refs #382 #384

Merged
merged 1 commit into from
Jul 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Nicer solution to escape zsh completions, refs #382
  • Loading branch information
nonZero authored Jul 31, 2022
commit f245cfdd2bce38b5aeadb5ad218dac50440d5353
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