[Bash-completion-devel] notations which need to be documented

Raphaël raphael.droz at gmail.com
Mon Jun 13 12:50:53 UTC 2011


In:

* why define split in:
	local cur prev words cword split
eg: "if we use the -s (or -n =) switch in init_completion ..."


* why:
	$split && return 0
eg: "if split is true, the last argument as been splitted according
... so we return here because ..."


* why:
	[[ $COMPREPLY == *= ]] && compopt -o nospace
eg: "compopt nospace is ignored if COMPREPLY contains more than 1
element. In such case, if this completion ends with '=' we don't want a
space to be appended. It may be seen as:
      ${#COMPREPLY[@]} -eq 1 && ${COMPREPLY[0]} matches '^.*=$'
"


there may be others notations worth an explanation...


Raph



More information about the Bash-completion-devel mailing list