From 6fe70853a57f95121011b85ea2a1a0945960333d Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Tue, 7 Jul 2015 18:23:43 +0200 Subject: [PATCH] Expand tilde in @resurrect-dir Fixes #74 --- CHANGELOG.md | 1 + scripts/helpers.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5168c76..7d3f738 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ content history - refactoring: drop dependency on `paste` command - bugfix for pane contents restoration +- expand tilde char `~` if used with `@resurrect-dir` ### v2.4.0, 2015-02-23 - add "tmux-test" diff --git a/scripts/helpers.sh b/scripts/helpers.sh index 64e45a9..5e2d7fc 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -74,7 +74,8 @@ is_session_grouped() { # path helpers resurrect_dir() { - echo $(get_tmux_option "$resurrect_dir_option" "$default_resurrect_dir") + local path="$(get_tmux_option "$resurrect_dir_option" "$default_resurrect_dir")" + echo "${path/#\~/$HOME}" # expands tilde if used with @resurrect-dir } resurrect_file_path() {