Improve EDITOR checks

This commit is contained in:
2013-06-17 13:39:13 +01:00
parent 7a9c94ff6f
commit fb5a775d98
4 changed files with 16 additions and 4 deletions

View File

@@ -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 "