diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-01-31 15:57:08 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-01-31 15:57:08 -0800 |
commit | ad8d68dd4390753901b5e1dae4b4c4b44be7fcea (patch) | |
tree | 5b8f5e3ca3d698dd7ae764f2833ab7b91726fd93 /complete.cpp | |
parent | 0db1b6ce44b2dcae94a4d33c04b606ef819bb78b (diff) |
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
Diffstat (limited to 'complete.cpp')
-rw-r--r-- | complete.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/complete.cpp b/complete.cpp index 1739b8cd..669fd574 100644 --- a/complete.cpp +++ b/complete.cpp @@ -465,7 +465,7 @@ bool completer_t::condition_test(const wcstring &condition) if (cached_entry == condition_cache.end()) { /* Compute new value and reinsert it */ - test_res = (0 == exec_subshell(condition)); + test_res = (0 == exec_subshell(condition, false /* don't apply exit status */)); condition_cache[condition] = test_res; } else @@ -1007,7 +1007,7 @@ void completer_t::complete_cmd_desc(const wcstring &str) since apropos is only called once. */ wcstring_list_t list; - if (exec_subshell(lookup_cmd, list) != -1) + if (exec_subshell(lookup_cmd, list, false /* don't apply exit status */) != -1) { /* |