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
|
set -e
|
||||||
[ -n "$TMUXIFIER_DEBUG" ] && set -x
|
[ -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
|
if [ -z "$1" ]; then
|
||||||
echo "$(tmuxifier-help new-session)" >&2
|
echo "$(tmuxifier-help new-session)" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -2,6 +2,14 @@
|
|||||||
set -e
|
set -e
|
||||||
[ -n "$TMUXIFIER_DEBUG" ] && set -x
|
[ -n "$TMUXIFIER_DEBUG" ] && set -x
|
||||||
|
|
||||||
|
# Provide tmuxifier completions
|
||||||
|
if [ "$1" == "--complete" ]; then
|
||||||
|
for item in $(tmuxifier-list-windows); do
|
||||||
|
echo "$item"
|
||||||
|
done
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo "$(tmuxifier-help new-window)" >&2
|
echo "$(tmuxifier-help new-window)" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user