From 1ef310c3a8061eb1ac2d6c54198b4961294013f0 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Sun, 1 Oct 2017 01:08:10 -0700 Subject: [PATCH] Fix `export` returning 1 on success Fixes #4435 --- share/functions/export.fish | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/functions/export.fish b/share/functions/export.fish index d0d1bbb2b..d51a3f557 100644 --- a/share/functions/export.fish +++ b/share/functions/export.fish @@ -13,6 +13,8 @@ function export --description 'Set env variable. Alias for `set -gx` for bash co set -l colonized_path (string replace -- "$$v[1]" (string join ":" -- $$v[1]) $v[2]) set -gx $v[1] (string split ":" -- $colonized_path) else + # status is 1 from the contains check, and `set` does not change the status on success: reset it. + true set -gx $v[1] $v[2] end end