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

Rubocop clash with fish #418

Open
alekstheod opened this issue Jun 1, 2022 · 0 comments
Open

Rubocop clash with fish #418

alekstheod opened this issue Jun 1, 2022 · 0 comments

Comments

@alekstheod
Copy link

alekstheod commented Jun 1, 2022

Tried to run rubocop in neovim with a default fish shell
Instead of my code got a string.

fish: $/ is not a valid variable in fish.
rubocop --auto-correct --stdin "path to my file" 2>/dev/null | sed "1,/^====================$/d"

Proposed fix:

index fcf199d..fb6a245 100644
--- a/autoload/neoformat/formatters/ruby.vim
+++ b/autoload/neoformat/formatters/ruby.vim
@@ -20,7 +20,7 @@ endfunction
 function! neoformat#formatters#ruby#rubocop() abort
      return {
         \ 'exe': 'rubocop',
-        \ 'args': ['--auto-correct', '--stdin', '"%:p"', '2>/dev/null', '|', 'sed "1,/^====================$/d"'],
+        \ 'args': ['--auto-correct', '--stdin', '"%:p"', '2>/dev/null', '|', "sed '1,/^====================$/d'"],
         \ 'stdin': 1,
         \ 'stderr': 1
         \ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant