Select Git revision
_error.function.fish
_error.function.fish 406 B
# use syntax:
# . (dirname (status current-filename))/../helpers/_error.function.fish
function _error --description 'Call with `_error <msg> <var1> <var2> … <var_n>` to abort the program' --no-scope-shadowing
for i in $argv[2..]
set out $out {$i}="$$i"
end
begin; set_color brred; echo -n $argv[1]; set_color red; echo ' ('(string join ', ' $out)')'; set_color normal; end 1>&2
exit 1
end