mirror of
https://github.com/chenasraf/dotfiles.git
synced 2026-05-18 01:29:06 +00:00
fix(autocomplete): tx autocompletions
This commit is contained in:
@@ -15,10 +15,38 @@ cmds=(
|
||||
'remove:Remove a tmux workspace from the config file'
|
||||
'create:Create a new tmux session (temporary)'
|
||||
'attach:Attach to a tmux session'
|
||||
'prj:Create a new tmux session (temporary) from project folder'
|
||||
)
|
||||
for i in $names; do
|
||||
sessions+=("$i")
|
||||
done
|
||||
|
||||
_describe 'session' sessions
|
||||
# _describe 'cmds' cmds
|
||||
case $words[2] in
|
||||
show)
|
||||
_arguments \
|
||||
'2:session:compadd -a sessions' \
|
||||
'--help[Show help]'
|
||||
;;
|
||||
edit)
|
||||
_arguments \
|
||||
'--local[Edit local config file (instead of global)]' \
|
||||
;;
|
||||
remove)
|
||||
_arguments \
|
||||
'2:session:compadd -a sessions' \
|
||||
'--help[Show help]' \
|
||||
'--key[The key to remove]' \
|
||||
'--local[Remove from local config file (instead of global)]' \
|
||||
'--dry[Dry run]'
|
||||
;;
|
||||
attach)
|
||||
open_sessions=($(tmux ls | cut -d: -f1))
|
||||
_arguments \
|
||||
'2:session:compadd -a open_sessions' \
|
||||
'--help[Show help]'
|
||||
;;
|
||||
*)
|
||||
_describe 'session' sessions
|
||||
_describe 'command' cmds
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user