variable
COMP_POINT
The cursor offset from the beginning of COMP_LINE in the completion context. At end of this ASCII example it equals the length of the line; do not infer Unicode grapheme positions from this fixture. This fixture records the value inside the completion callback; it is not an ordinary persistent variable. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Use interactive Bash with default key bindings; expected visible result: BM_VALUE=10.
Formal Syntax & Structure
bash syntaxbash
COMP_POINTReturn Value
shell variable
Expansion yields the current value in its applicable context, not a separate command exit status.
Working Example
Example Snippetbash
# In fresh interactive Bash, enter:bm_demo() { :; }_bm_complete() { printf "\nBM_VALUE=%s\n" "$COMP_POINT"; COMPREPLY=(alpha); }complete -F _bm_complete bm_demo# Type bm_demo al then press Tab, then Enter.