diff --git a/libexec/tmuxifier-edit-session b/libexec/tmuxifier-edit-session index 176e0a8..00f9077 100755 --- a/libexec/tmuxifier-edit-session +++ b/libexec/tmuxifier-edit-session @@ -37,4 +37,10 @@ if [ ! -f "$layout_file" ]; then exit 1 fi -exec "$EDITOR" "$layout_file" +if [ -n "$EDITOR" ]; then + exec "$EDITOR" "$layout_file" +else + echo "'\$EDITOR' is not set. Please manually open the layout for editing:" + echo "$layout_file" + echo +fi diff --git a/libexec/tmuxifier-edit-window b/libexec/tmuxifier-edit-window index 07fe71a..36d7e13 100755 --- a/libexec/tmuxifier-edit-window +++ b/libexec/tmuxifier-edit-window @@ -37,4 +37,10 @@ if [ ! -f "$layout_file" ]; then exit 1 fi -exec "$EDITOR" "$layout_file" +if [ -n "$EDITOR" ]; then + exec "$EDITOR" "$layout_file" +else + echo "'\$EDITOR' is not set. Please manually open the layout for editing:" + echo "$layout_file" + echo +fi diff --git a/libexec/tmuxifier-new-session b/libexec/tmuxifier-new-session index f6eff6a..6787f2f 100755 --- a/libexec/tmuxifier-new-session +++ b/libexec/tmuxifier-new-session @@ -46,7 +46,7 @@ fi content="$(cat "$template")" echo "${content//\{\{SESSION_NAME\}\}/$layout_name}" > "$layout_file" -if [ ! -z "$EDITOR" ]; then +if [ -n "$EDITOR" ]; then exec "$EDITOR" "$layout_file" else echo "Layout file has been created, but '\$EDITOR' is not set. Please " diff --git a/libexec/tmuxifier-new-window b/libexec/tmuxifier-new-window index 252f78a..726cd16 100755 --- a/libexec/tmuxifier-new-window +++ b/libexec/tmuxifier-new-window @@ -46,7 +46,7 @@ fi content="$(cat "$template")" echo "${content//\{\{WINDOW_NAME\}\}/$layout_name}" > "$layout_file" -if [ ! -z "$EDITOR" ]; then +if [ -n "$EDITOR" ]; then exec "$EDITOR" "$layout_file" else echo "Layout file has been created, but '\$EDITOR' is not set. Please "