-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot cmd in current file whose directory starts with r #40
Comments
gtfo.vim doesn't know the parameters for the numerous terminals in existence; they need to be provided explicitly. Try this instead:
|
That seems to solve it. Would be good if it would be added to readme and doc. |
Yep, there are some problems with shell escaping with Nvim on Windows. Please wait until 0.2. is released before using Nvim on Windows :) |
I saw that shell escaping PRs have been merged but when I got the latest master from neovim (neovim/neovim@58d2ce9) I still see the same issue. I don't see any issues/PRs tagged with I do have |
I see that |
https://github.com/justinmk/vim-gtfo#settings does mention that, but I added a note to https://github.com/justinmk/vim-gtfo#platform-support also. |
@justinmk I use |
@prabirshrestha I thought you indicated that it's only a problem in neovim. Is it a gtfo.vim problem, present in vim and neovim? When I checked it did not seem to be a problem with gtfo.vim + gvim.
Almost certainly by accident, e.g. they just happen to not send a path constructed by
Mostly, yes. Try it with |
In gvim/vim it works correctly on windows with
|
@prabirshrestha If you can come up with a minimal test case a bug report at neovim repo would be most welcome. |
@justinmk Here is the minimal vimrc. " clone in ~/.vimplugins/vim-gtfo
" git clone https://github.com/justinmk/vim-gtfo .vimplugins/vim-gtfo
set nocompatible
syntax on
filetype plugin indent on
if has('win32') || has('win64')
set shellslash
endif
set runtimepath+=~/.vimplugins/vim-gtfo
if has('win32') || has('win64')
let g:gtfo#terminals = { 'win' : 'cmd /k' }
endif Vim8:
|
@justinmk Still doesn't seem to work with latest neovim 2.2/2.3 |
@justinmk I think I finally figured out the problem. This code doesn't work. func! s:force_cmdexe() abort
if &shell !~? "cmd" || &shellslash
let s:shell=&shell | let s:shslash=&shellslash | let s:shcmdflag=&shellcmdflag
set shell=$COMSPEC noshellslash shellcmdflag=/c
endif
endf Changing it to the following code seems to work. func! s:force_cmdexe() abort
if &shell !~? "cmd" || &shellslash
let s:shell=&shell | let s:shslash=&shellslash | let s:shcmdflag=&shellcmdflag
exec 'set shell='.$COMSPEC
set noshellslash shellcmdflag=/c
endif
endf Would be possible to update the plugin to use this code in the meantime while we have a proper fix for neovim? |
If I have a file called
d:\r\hello.txt
and usegot
withlet g:gtfo#terminals = { 'win' : 'cmd' }
setting. The cmd opens and closes.I'm suspecting it has do to something with
\r
being a special character.This seems to open correctly.
/k
in cmd says to remain in the terminal so it does not exit after the script is complete./d
in cd says to change current drive. This would avoid parsing drive letter.The text was updated successfully, but these errors were encountered: