[Bash-completion-devel] tmux completion

Ville Skyttä ville.skytta at iki.fi
Sun Nov 6 22:39:22 UTC 2011

On 08/20/2011 08:24 PM, Fahd Shariff wrote:
> Hello Bash Completion Team,
> I would like to request the addition of "tmux" completion to the
> bash-completion project.
> I have attached my completion script, which I have been using for a
> while. It would be nice if someone could review it.

Could you port it to current dynamic loading way and submit as a "git
format-patch" formatted patch?

Declaring the big maps would probably be more efficient if done outside
of the _tmux() function so they're done only once at completion snippet
load time.

Use the standard _init_completion way at start of the function for cur,
prev and friends, and cword instead of COMP_WORD etc, see examples in
git (completions/*).

$opt and $len leaked to environment ("local" missing)?

Does tmux have --help/-h/--usage output we could parse instead of
hardcoding options (-2, -8, -c etc)?  See _parse_help and _parse_usage
examples in existing completions.

More information about the Bash-completion-devel mailing list