If there are no grouped sessions, do not output empty line

This commit is contained in:
Bruno Sutic 2015-02-09 16:05:36 +01:00
parent 95ec3c1d9b
commit 1c8efb034a
No known key found for this signature in database
GPG Key ID: 66D96E4F2F7EF26C
2 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,7 @@
as other tweaks
- save and restore grouped sessions (used with multi-monitor workflow)
- save and restore active and alternate windows in grouped sessions
- if there are no grouped sessions, do not output empty line to "last" file
### v1.5.0, 2014-11-09
- add support for restoring neovim sessions

View File

@ -150,7 +150,9 @@ dump_grouped_sessions() {
fetch_and_dump_grouped_sessions(){
local grouped_sessions_dump="$(dump_grouped_sessions)"
get_grouped_sessions "$grouped_sessions_dump"
echo "$grouped_sessions_dump"
if [ -n "$grouped_sessions_dump" ]; then
echo "$grouped_sessions_dump"
fi
}
# translates pane pid to process command running inside a pane