diff --git a/CHANGELOG.md b/CHANGELOG.md index f604101..408ebda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,8 @@ - always use `-ao` flags for `ps` command to detect commands - Deprecate restoring shell history feature. - `view` added to the list of automatically restored programs +- Enable vim session strategy to work with custom session files, + e.g. `vim -S Session1.vim`. ### v2.4.0, 2015-02-23 - add "tmux-test" diff --git a/strategies/vim_session.sh b/strategies/vim_session.sh index 8121344..1b5293c 100755 --- a/strategies/vim_session.sh +++ b/strategies/vim_session.sh @@ -13,18 +13,9 @@ vim_session_file_exists() { [ -e "${DIRECTORY}/Session.vim" ] } -original_command_contains_session_flag() { - [[ "$ORIGINAL_COMMAND" =~ "-S" ]] -} - main() { if vim_session_file_exists; then echo "vim -S" - elif original_command_contains_session_flag; then - # Session file does not exist, yet the original vim command contains - # session flag `-S`. This will cause an error, so we're falling back to - # starting plain vim. - echo "vim" else echo "$ORIGINAL_COMMAND" fi