$COMP_CWORD  –  Index of Completed Word

$COMP_CWORD is the index of the word in $COMP_WORDS, which contains the cursor position.

This variable is only available in functions invoked by the programmable completion.

BashSupport Pro is a Bash IDE with support for $COMP_CWORDtry it now!
© 2020–2024 Joachim Ansorg
Imprint
Privacy Policy
Legal