mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 20:31:19 -03:00
Make subcommands modify $status, and make builtin_set not modify status unless it fails
https://github.com/fish-shell/fish-shell/issues/547 https://github.com/fish-shell/fish-shell/issues/214
This commit is contained in:
4
kill.cpp
4
kill.cpp
@@ -112,7 +112,7 @@ void kill_add(const wcstring &str)
|
||||
|
||||
if (! cmd.empty())
|
||||
{
|
||||
if (exec_subshell(cmd) == -1)
|
||||
if (exec_subshell(cmd, false /* do not apply exit status */) == -1)
|
||||
{
|
||||
/*
|
||||
Do nothing on failiure
|
||||
@@ -175,7 +175,7 @@ static void kill_check_x_buffer()
|
||||
wcstring cmd = L"xsel -t 500 -b";
|
||||
wcstring new_cut_buffer=L"";
|
||||
wcstring_list_t list;
|
||||
if (exec_subshell(cmd, list) != -1)
|
||||
if (exec_subshell(cmd, list, false /* do not apply exit status */) != -1)
|
||||
{
|
||||
|
||||
for (i=0; i<list.size(); i++)
|
||||
|
||||
Reference in New Issue
Block a user