-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
job_start behaves differently than running the command in command line #4529
Comments
Same issue in neovim |
The prompt will be output to stderr, not stdout. |
@k-takata
Still no output append to the buffer and the file is deleted silently. |
Maybe because stdin is redirected to /dev/null?
|
That's possible. Thought based on the document:
stdin shouldn't be redirected by default. Explicitly running |
Using |
You must specify |
This is not a bug in Vim. The error message from rm that you see, is only issued, if rm is connected to a if (!x->ignore_missing_files
&& ((x->interactive == RMI_ALWAYS) || x->stdin_tty)
&& dirent_type != DT_LNK)
{
write_protected = write_protected_non_symlink (fd_cwd, filename, sbuf);
wp_errno = errno;
} So only when the stdin is a tty (or the You can see the same behaviour when using ssh, compare this:
You can force this in Vim using the |
Describe the bug
running rm command with job_start behaves differently than running it in the command line.
To Reproduce
First run in command line:
mkdir foo; cd foo; touch a; chmod u-w a;vim --clean
Actual behaviour
The file a is deleted without any output being append to the current buffer.
Expected behavior
Because the file a is write protected,
rm
promptsrm: remove write-protected regular empty file 'a'?
in the command line, while it didn't trigger theon_stdout
with this prompt.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: