You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can launch web help to see command syntax, but this requires switching to a browser and is less context sensitive.
Provide any additional context
The configuration of Yargs for Zowe CLI happens in the YargsConfigurer class.
On MacOS the script generated by Yargs looks like this:
#compdef zowe###-begin-zowe-completions-##### yargs command completion script## Installation: zowe completion >> ~/.zshrc# or zowe completion >> ~/.zprofile on OSX.#_zowe_yargs_completions()
{
local reply
local si=$IFS
IFS=$'' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" zowe --get-yargs-completions "${words[@]}"))
IFS=$si
_describe 'values' reply
}
compdef _zowe_yargs_completions zowe
###-end-zowe-completions-###
Note: The built-in autocompletion provided by Yargs works pretty well, but we may need to customize the yargs.completion handler to extract only the first line out of command descriptions, because multiple lines seem to mess it up.
The text was updated successfully, but these errors were encountered:
Thank you for raising this enhancement request.
The community has 90 days to vote on it.
If the enhancement receives at least 5 upvotes, it is added to our development backlog.
If it receives fewer votes, the issue is closed.
Is your feature or enhancement request related to a problem or limitation? Please describe
I wish that Tab auto-completion would be supported by Zowe CLI in popular shells like Bash and Zsh.
Describe your enhancement idea
Enable autocompletion in Zowe CLI with the
yargs.completion
API, which enables azowe completion
command to generate a shell script that can be added to~/.bashrc
or~/.zshrc
: https://yargs.js.org/docs/#api-reference-completioncmd-description-fnDescribe alternatives you've considered
I can launch web help to see command syntax, but this requires switching to a browser and is less context sensitive.
Provide any additional context
The configuration of Yargs for Zowe CLI happens in the YargsConfigurer class.
On MacOS the script generated by Yargs looks like this:
Note: The built-in autocompletion provided by Yargs works pretty well, but we may need to customize the
yargs.completion
handler to extract only the first line out of command descriptions, because multiple lines seem to mess it up.The text was updated successfully, but these errors were encountered: