Closed cgjosephlee closed 5 years ago
Just curious, how does this if
clause work?
https://github.com/kloetzl/biozsh/blob/c163056182bd1fcceefae3516695abdaba37eac4/completions/_samtools#L271
I guess if the subcommand is not defined, it will show a warning message. I have tried a few circumstances and did not see the message popup. Would you please give a brief explanation?
Thanks for your work!
Would you please give a brief explanation?
Quoting from the docs:
If a function name exists, it is called with the arguments args. The return argument gives the name of a parameter in which the return status from the function name should be stored; if return is empty or a single hyphen it is ignored.
The return status of _call_function itself is zero if the function name exists and was called and non-zero otherwise.
If you do not see the message, maybe your zsh theme simply just doesn't show them? I had to add the following lines to my dotfiles to see them. source.
# Display message when no matches are found
# formatting and messages
zstyle ':completion:*' verbose yes
zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion:*:messages' format '%d'
zstyle ':completion:*:warnings' format 'No matches for: %B%d%b'
update samtools view
options.
Commits rebased!
Merged, thanks!
Update to samtools v1.8, but not all subcommands are implemented.
And v1.9 removes some options in mpileup, I haven't updated to this version yet.