Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve history behavior

  • Loading branch information...
commit 9eeba021571da50fde48b44c53a467b3290807e1 1 parent a326699
@Shougo authored
View
4 autoload/vimshell/history.vim
@@ -45,7 +45,9 @@ function! vimshell#history#append(command) "{{{
let no_history_commands = g:vimshell_interactive_no_save_history_commands
endif
- if program == '' || program =~ '^\\\?!' || has_key(no_history_commands, program)
+ if program == '' || program =~ '^\\\?!'
+ \ || has_key(no_history_commands, program)
+ \ || isdirectory(program)
" No history command.
return
endif
View
10 autoload/vimshell/mappings.vim
@@ -322,11 +322,6 @@ function! s:execute_command_line(is_insert, oldpos) "{{{
" Save cmdline.
let b:vimshell.cmdline = line
- " Not append history if starts spaces or dups.
- if line !~ '^\s'
- call vimshell#history#append(line)
- endif
-
try
let ret = vimshell#parser#eval_script(line, context)
catch /File ".*" is not found./
@@ -356,6 +351,11 @@ function! s:execute_command_line(is_insert, oldpos) "{{{
return
endtry
+ " Not append history if starts spaces or dups.
+ if line !~ '^\s'
+ call vimshell#history#append(line)
+ endif
+
if ret == 0
call vimshell#next_prompt(context, a:is_insert)
endif
View
4 plugin/vimshell.vim
@@ -1,7 +1,7 @@
"=============================================================================
" FILE: vimshell.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
-" Last Modified: 04 Feb 2014.
+" Last Modified: 17 Feb 2014.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
@@ -74,7 +74,7 @@ let g:vimshell_external_history_path =
\ get(g:, 'vimshell_external_history_path', '')
let g:vimshell_no_save_history_commands =
\ get(g:, 'vimshell_no_save_history_commands', {
- \ 'history' : 1, 'h' : 1, 'histdel' : 1
+ \ 'history' : 1, 'h' : 1, 'histdel' : 1, 'cd' : 1,
\ })
let g:vimshell_scrollback_limit =
\ get(g:, 'vimshell_scrollback_limit', 1000)
Please sign in to comment.
Something went wrong with that request. Please try again.