mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 01:46:40 +00:00
Add various checks to print something useful when things go wrong
This commit is contained in:
@@ -26,4 +26,12 @@ fi
|
||||
|
||||
content="$(cat "$template")"
|
||||
echo "${content/\{\{SESSION_NAME\}\}/$layout_name}" > "$layout_file"
|
||||
exec "$EDITOR" "$layout_file"
|
||||
|
||||
if [ ! -z "$EDITOR" ]; then
|
||||
exec "$EDITOR" "$layout_file"
|
||||
else
|
||||
echo "Layout file has been created, but '\$EDITOR' is not set. Please "
|
||||
echo "manually open the layout for editing:"
|
||||
echo "$layout_file"
|
||||
echo
|
||||
fi
|
||||
|
||||
@@ -26,4 +26,12 @@ fi
|
||||
|
||||
content="$(cat "$template")"
|
||||
echo "${content/\{\{WINDOW_NAME\}\}/$layout_name}" > "$layout_file"
|
||||
exec "$EDITOR" "$layout_file"
|
||||
|
||||
if [ ! -z "$EDITOR" ]; then
|
||||
exec "$EDITOR" "$layout_file"
|
||||
else
|
||||
echo "Layout file has been created, but '\$EDITOR' is not set. Please "
|
||||
echo "manually open the layout for editing:"
|
||||
echo "$layout_file"
|
||||
echo
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user