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

Auto completion for fish #183

Closed
Zesko opened this issue Jan 15, 2022 · 1 comment
Closed

Auto completion for fish #183

Zesko opened this issue Jan 15, 2022 · 1 comment

Comments

@Zesko
Copy link

Zesko commented Jan 15, 2022

I create new autocompletion for fish shell.

complete -c tldr -s h -l help        -d "show this help message" -f
complete -c tldr -s v -l version     -d "show program's version number" -f
complete -c tldr -s u -l update      -d "Update the local cache of pages" -f
complete -c tldr -s p -l platform    -d "Override the operating system" -xa "linux osx sunos windows common"
complete -c tldr -s l -l list        -d "List all commands in the cache" -f
complete -c tldr -s s -l source      -d "Override the default page source" -r
complete -c tldr -s c -l color       -d "Override color stripping" -f
complete -c tldr -s r -l render      -d "Render local markdown files" -r
complete -c tldr -s l -l language    -d "Override the default language" -f
complete -c tldr -s m -l markdown    -d "Just print the plain page file" -f
complete -c tldr -l print-completion -d "Print shell completion script" -xa "bash zsh tcsh"

function __tldr_commands
    tldr --list | string replace -a -r "', '" "\n" | string replace -a -r "\['|'\]" ""
end

complete -f -c tldr -a "(__tldr_commands)"

Can you add it into /usr/share/fish/vendor_completions.d/tldr.fish ?

@CleanMachine1 CleanMachine1 changed the title Aut completion for fish Auto completion for fish Jan 19, 2022
@MasterOdin
Copy link
Collaborator

Thanks for providing this. I plan to add a link to the README to this issue so that people using fish can come here to get autocomplete, and tweak things over time. This isn't something I plan to formally support as I don't use fish and have no interest in trying to maintain this, especially given all our other completions are autogenerated. Ideally, someone would be able to work with our upstream provider, shtab, to provide support for fish there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants