As described in this StackOverflow question:
http://superuser.com/questions/336016/invoking-vi-through-find-xargs-breaks-my-terminal-why
This is a common case when piping find to xargs with vim as the command, eg
find . -type f | xargs vim
Running this chain breaks the tty interaction in vim, and breaks the shell tty upon exit from vim.
A workaround is to run stty sane upon exit from vim, but the tty still has issues while using vim. One annoying example is the backspace button not actually deleting, but inserting a backspace character.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, .![]()
I have also discovered the -o flag will reopen STDIN with xargs, which also fixes the issue.
I have also discovered the
-oflag will reopen STDIN with xargs, which also fixes the issue.
find . -type f -print0 | xargs -o -0 vim
@apeschel Hi xargs -o is not a GNU xargs option but a BSD xargs option.
Any workaround for Linux ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
@vim-ml I just found this command thanks to james-mcguigan's answer on superuser :
find ..... | xargs sh -c 'vim </dev/tty "$@"' whatever
With that command you don't need to install parallel on the machine anymore 😄
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
@apeschel Hi xargs -o is not a GNU xargs option but a BSD xargs option.
FWIW: This has been added to GNU xargs as of https://git.savannah.gnu.org/cgit/findutils.git/commit/?id=40cd25147 (2017)
So any recent linux distribution should have it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
@apeschel Hi xargs -o is not a GNU xargs option but a BSD xargs option.
FWIW: This has been added to GNU xargs as of https://git.savannah.gnu.org/cgit/findutils.git/commit/?id=40cd25147 (2017)
So any recent linux distribution should have it.
My findutils package is my Linux distrib is from 2016.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
2016? Four years ago? Don't you think it might perhaps be time to think, just think, of getting ready for, I don't know, an upgrade?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
well Ubuntu 14.04 LTS is still maintained until around 2022 and I remember having to work with an older Cent OS release that was still available.
Anyhow, I am currently tending to close this issue, as this thread has shown various ways to prevent or work around closing of stdin.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
@chrisbra Ubuntu 16.04 LTS has findutils version 4.6.0+git+20160126-2
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Closed #982.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()