-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
New menu command: Run a system command in this directory. #1214
Conversation
nerdtree_plugin/fs_menu.vim
Outdated
let l:directory = l:node.path.isDirectory ? l:node.path.str() : l:node.parent.path.str() | ||
execute 'cd '.l:directory | ||
|
||
echo "\n".join(systemlist(input(l:directory . (nerdtree#runningWindows() ? "> " : " $ "))), "\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[vint] reported by reviewdog 🐶
Prefer single quoted strings (see Google VimScript Style Guide (Strings))
nerdtree_plugin/fs_menu.vim
Outdated
let l:directory = l:node.path.isDirectory ? l:node.path.str() : l:node.parent.path.str() | ||
execute 'cd '.l:directory | ||
|
||
echo "\n".join(systemlist(input(l:directory . (nerdtree#runningWindows() ? "> " : " $ "))), "\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[vint] reported by reviewdog 🐶
Prefer single quoted strings (see Google VimScript Style Guide (Strings))
nerdtree_plugin/fs_menu.vim
Outdated
let l:directory = l:node.path.isDirectory ? l:node.path.str() : l:node.parent.path.str() | ||
execute 'cd '.l:directory | ||
|
||
echo "\n".join(systemlist(input(l:directory . (nerdtree#runningWindows() ? "> " : " $ "))), nr2char(10)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[vint] reported by reviewdog 🐶
Prefer single quoted strings (see Google VimScript Style Guide (Strings))
nerdtree_plugin/fs_menu.vim
Outdated
let l:directory = l:node.path.isDirectory ? l:node.path.str() : l:node.parent.path.str() | ||
execute 'cd '.l:directory | ||
|
||
echo "\n".join(systemlist(input(l:directory . (nerdtree#runningWindows() ? "> " : " $ "))), nr2char(10)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[vint] reported by reviewdog 🐶
Prefer single quoted strings (see Google VimScript Style Guide (Strings))
systemlist() was introduced sometime in Vim 8+, so I switched to system() for 7.4 compatibility.
Description of Changes
Closes #1211
Invoking this menu option -
m
,s
- will prompt the user for a command to run in the selected directory (or the file's directory). If the command produces any output, it is echoed back to the screen.New Version Info
Author's Instructions
MAJOR.MINOR.PATCH
version number. Increment the:MAJOR
version when you make incompatible API changesMINOR
version when you add functionality in a backwards-compatible mannerPATCH
version when you make backwards-compatible bug fixesCollaborator's Instructions