Skip to content
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

VIM-1357+VIM-1566: Use OS shell to run filter command #332

Merged
merged 4 commits into from Jun 24, 2021

Conversation

citizenmatt
Copy link
Member

This PR fixes a few issues with the filter (:!) command:

  • Use OS shell to execute the given command. On Unix, this is $SHELL or sh, on Windows, this is cmd.exe. Fixes VIM-1566 and VIM-1357
  • Add 'shellcmdflag', 'shellxescape' and 'shellxquote' options, required to properly run, quote and escape parameters
  • Errors are displayed or substituted into text, like Vim
  • Long running tasks can be cancelled
  • Adds support for % inside a filter command, mapping to the current file name

… handling

Also moves the filter command out of a write action, and under a cancellable modal progress dialog. Any errors are substituted into the text, as per Vim.

Fixes #VIM-1357
@citizenmatt citizenmatt changed the title Use OS shell to run filter command VIM-1357+VIM-1566 Use OS shell to run filter command Jun 17, 2021
@citizenmatt citizenmatt changed the title VIM-1357+VIM-1566 Use OS shell to run filter command VIM-1357+VIM-1566: Use OS shell to run filter command Jun 17, 2021
@AlexPl292 AlexPl292 merged commit 982d692 into JetBrains:master Jun 24, 2021
@AlexPl292
Copy link
Member

That's great! Thank you for the fixes!

@citizenmatt citizenmatt deleted the feature/shell-filter branch June 24, 2021 08:04
@keithn
Copy link

keithn commented Aug 30, 2021

thanks for this PR, really love my shell filters in Vim!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants