Bash-it / bash-it

A community Bash framework.
MIT License
14.3k stars 2.29k forks source link

[Feature]: Add completion for -c option to tmux new-session command #2245

Open daniboygg opened 8 months ago

daniboygg commented 8 months ago

Expected behavior

When creating a new tmux session, there is a -c option to set the start-directory. So, tmux new-session -c <tab><tab> should show you the paths of the current dir, just like cdcommand

Current behavior

There is no autocompletion for -c argument in tmux new-session comand

Possible solution

I think adding the line -c) COMPREPLY=( $(compgen -d -S / -- "${cur}") ); return 0;; to new-session file in https://github.com/Bash-it/bash-it/blob/master/completion/available/tmux.completion.bash should do it.

I'm not experience enough in bash to know if there is a better way to do this...

Context

No response

Notes

No response