abelsromero / bash-extensions

:computer: Custom Bash extensions
GNU Lesser General Public License v3.0
1 stars 0 forks source link

Fix usage of "${COMP_WORDS[COMP_CWORD]}" #16

Open abelsromero opened 1 year ago

abelsromero commented 1 year ago

The expression is used to obtain the current word, but at least in MacOS it always returns empty and the _gh_install_latest_release_completion works even when passing "" got compgen.

abelsromero commented 1 year ago

This works on mac local -r current_word="${COMP_WORDS[$((COMP_CWORD-1))]}"