Skip to content

Commit 708ce20

Browse files
authored
Merge pull request #190 from jaspertandy/master
2 parents 29d46f6 + a70218b commit 708ce20

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

doc/vimux.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,5 +431,21 @@ Caution: It is probably best not to mix this with |VimuxRunnerName|.
431431
<
432432
Default: 0
433433

434+
------------------------------------------------------------------------------
435+
*VimuxCommandShell*
436+
4.12 g:VimuxCommandShell~
437+
438+
Set this option to `1` or `v:true` to enable shell completion in
439+
VimuxPromptCommand
440+
Set this option to `0` or `v:false` to enable vim command editing in
441+
VimuxPromptCommand
442+
443+
Enabling shell completion blocks the ability to use up-arrow to cycle through
444+
previously-run commands in VimuxPromptCommand.
445+
>
446+
let g:VimuxCommandShell = 0
447+
<
448+
Default: 1
449+
434450
==============================================================================
435451
vim:tw=78:ts=2:sw=2:expandtab:ft=help:norl:

plugin/vimux.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ let g:VimuxTmuxCommand = get(g:, 'VimuxTmuxCommand', 'tmux')
1616
let g:VimuxUseNearest = get(g:, 'VimuxUseNearest', v:true)
1717
let g:VimuxExpandCommand = get(g:, 'VimuxExpandCommand', v:false)
1818
let g:VimuxCloseOnExit = get(g:, 'VimuxCloseOnExit', v:false)
19+
let g:VimuxCommandShell = get(g:, 'VimuxCommandShell', v:true)
1920

2021
function! VimuxOption(name) abort
2122
return get(b:, a:name, get(g:, a:name))
@@ -175,7 +176,11 @@ endfunction
175176

176177
function! VimuxPromptCommand(...)
177178
let command = a:0 ==# 1 ? a:1 : ''
178-
let l:command = input(VimuxOption('VimuxPromptString'), command, 'shellcmd')
179+
if VimuxOption('VimuxCommandShell')
180+
let l:command = input(VimuxOption('VimuxPromptString'), command, 'shellcmd')
181+
else
182+
let l:command = input(VimuxOption('VimuxPromptString'), command)
183+
endif
179184
if VimuxOption('VimuxExpandCommand')
180185
let l:command = join(map(split(l:command, ' '), 'expand(v:val)'), ' ')
181186
endif

0 commit comments

Comments
 (0)