mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 01:46:40 +00:00
Make layout API-interface a bit simpler
Additionally, also fix a bug when creating a window, where as if the session name was the same as a window that already existed, it would fail, accidentally using the window rather than the session at a target.
This commit is contained in:
@@ -24,5 +24,6 @@ if [ -f "$layout_file" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp "$template" "$layout_file"
|
||||
content="$(cat "$template")"
|
||||
echo "${content/\{\{SESSION_NAME\}\}/$layout_name}" > "$layout_file"
|
||||
exec "$EDITOR" "$layout_file"
|
||||
|
||||
@@ -24,5 +24,6 @@ if [ -f "$layout_file" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp "$template" "$layout_file"
|
||||
content="$(cat "$template")"
|
||||
echo "${content/\{\{WINDOW_NAME\}\}/$layout_name}" > "$layout_file"
|
||||
exec "$EDITOR" "$layout_file"
|
||||
|
||||
Reference in New Issue
Block a user