mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 09:56:39 +00:00
Add completion to new-session and new-window commands
Complete names of existing sessions and windows for the `new` commands, enabling easier creation of similarly named layouts.
This commit is contained in:
@@ -2,6 +2,14 @@
|
||||
set -e
|
||||
[ -n "$TMUXIFIER_DEBUG" ] && set -x
|
||||
|
||||
# Provide tmuxifier completions
|
||||
if [ "$1" == "--complete" ]; then
|
||||
for item in $(tmuxifier-list-sessions); do
|
||||
echo "$item"
|
||||
done
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "$(tmuxifier-help new-session)" >&2
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user