mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 09:56:39 +00:00
Improve new_window helper function's internals
This commit is contained in:
@@ -16,13 +16,14 @@ new_window() {
|
||||
if [ ! -z "$1" ]; then
|
||||
window="$1"
|
||||
fi
|
||||
local command=()
|
||||
if [ ! -z "$2" ]; then
|
||||
local command="\"$2\""
|
||||
command+=("$2")
|
||||
fi
|
||||
if [ ! -z "$window" ]; then
|
||||
local winarg="-n \"$window\""
|
||||
local winarg=(-n "$window")
|
||||
fi
|
||||
eval "tmux new-window -t \"$session:\" $winarg $command"
|
||||
tmux new-window -t "$session:" "${winarg[@]}" "${command[@]}"
|
||||
}
|
||||
|
||||
# Select a specific window.
|
||||
|
||||
Reference in New Issue
Block a user