batman completion
When running batman there is no completion upon tab tapping. Is there a way to "link" man autocompletion with batman?
It would depend on your shell. I'm not sure about completions for bash and zsh, but for fish it is:
complete batman --wraps man
After a little search, I think I made it out with bash
I found something relative here and here
And I added into .bashrc the following line.
complete -f _longopt batman
I use zsh alongside with bash. I think I did not find the right way to make the same thing on zsh. If someone can tell if the above solution is right, and if someone could tell the "solution" for zsh would be nice!
for those using bash, _comp_cmd_man (the completion function for man included in scop/bash-completion) can be reused for batman:
- look for the completion script for
man, usually/usr/share/bash-completion/completions/manifbash-completionis installed on your system, or download the script from here - copy that to a new completion script, preferably named
batman, with thecomplete -F _comp_cmd_manline modified forbatman - put the new script in
${BASH_COMPLETION_USER_DIR:-$XDG_DATA_HOME/bash-completion}/completions/for lazy load, or source the script / paste the content of the script to either~/.bash_completionor~/.bashrc(see the answer toWhere should I install my own local completions?)
@christ4k have you found the way to do it for zsh?
@christ4k have you found the way to do it for zsh?
Not sure if this is again the right way to do it. I followed this and I think I have the basic functionality of autocomplete with batman.
compdef _command batman
I put this line above in my .zshrc file