Gary Johnson wrote:
> I think this is a bug. In a bash shell on a Linux system, execute
> this:
>
> $ vim -N -u NONE <(ls)
>
> Then try to start a shell:
>
> :sh
>
> The command immediately returns.
>
> I discovered a work-around, but I don't know if it works generally.
> I mention it mainly to give more information to someone who might be
> able to fix the underlying problem.
>
> I created a wrapper for bash which I named mybash and put in my home
> directory:
>
> #!/bin/bash
> exec < /dev/tty
> exec /bin/bash "$@"
>
> If I then start vim like this:
>
> $ SHELL=$HOME/mybash vim -N -u NONE <(ls)
>
> and execute
>
> :sh
>
> it _does_ work.
>
> I don't know why vim should even be aware that its argument is the
> result of a process substitution. This might even be bug in bash.
>
> All versions of vim that I have tried exhibit the same behavior,
> from 8.0.1453 through 8.1.2231. I have tried bash versions
> 4.1.5(1), 4.3.48(1) and 4.4.19(1).
It looks like bash connects stdin to the file. This also fails:
:!sh
But this works:
:!sh </dev/tty
I would think this is a shell problem.
--
hundred-and-one symptoms of being an internet addict:
20. When looking at a pageful of someone else's links, you notice all of them
are already highlighted in purple.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201910312316.x9VNGBvq023906%40masaka.moolenaar.net.