Jakobus Schürz
d2f0657629
and use the same pathes for vim plugin repos on git.schuerz.at as on github.com
22 lines
652 B
Bash
22 lines
652 B
Bash
#!/bin/bash
|
|
|
|
|
|
function _keys() {
|
|
KEYS=""
|
|
for KEY_DIR in ${TMUX_SESSION_DIRS[*]};do
|
|
#KEYS=${KEYS}" $(find ${KEY_DIR}/* -type f|awk -F ${KEY_DIR}/ '{print $2}'|sed 's/\.session$//')"
|
|
KEYS=$(find ${TMUX_SESSION_DIRS[*]} -type f -name "*.session" -exec basename {} \; 2>/dev/null |sed 's/\.session$//')
|
|
done
|
|
echo $KEYS
|
|
}
|
|
|
|
function _keyfiles() {
|
|
COMPREPLY=()
|
|
local CUR KEYS
|
|
CUR="${COMP_WORDS[COMP_CWORD]}"
|
|
#KEYS="$(find ${KEY_DIR}/* -type f|awk -F ${KEY_DIR}/ '{print $2}'|sed 's/\.session$//')"
|
|
KEYS=$(_keys)
|
|
COMPREPLY=( $(compgen -W "${KEYS}" -- ${CUR}) )
|
|
return 0
|
|
}
|
|
complete -F _keyfiles tmuxx
|