diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 68ddea838..b02854286 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -102,6 +102,7 @@ Scripting improvements - ``string`` subcommands now quit early when used with ``--quiet`` (:issue:`7495`). - Failed redirections will now set ``$status`` (:issue:`7540`). - ``read`` can now read interactively from other files, so e.g. forcing it to read from the terminal via ``read _ sleep 5 + ^C⏎ + >_ fish_status_to_signal $status + SIGINT \ No newline at end of file diff --git a/share/functions/__fish_print_pipestatus.fish b/share/functions/__fish_print_pipestatus.fish index 22f75def4..aad28909a 100644 --- a/share/functions/__fish_print_pipestatus.fish +++ b/share/functions/__fish_print_pipestatus.fish @@ -23,7 +23,7 @@ function __fish_print_pipestatus --description "Print pipestatus for prompt" # SIGPIPE (141 = 128 + 13) is usually not a failure, see #6375. if not contains $last_status 0 141 set -l sep $brace_sep_color$separator$status_color - set -l last_pipestatus_string (__fish_status_to_signal $argv | string join "$sep") + set -l last_pipestatus_string (fish_status_to_signal $argv | string join "$sep") set -l last_status_string "" if test $last_status -ne $argv[-1] set last_status_string " "$status_color$last_status diff --git a/share/functions/__fish_status_to_signal.fish b/share/functions/fish_status_to_signal.fish similarity index 85% rename from share/functions/__fish_status_to_signal.fish rename to share/functions/fish_status_to_signal.fish index 47fa38ff5..2d09916dc 100644 --- a/share/functions/__fish_status_to_signal.fish +++ b/share/functions/fish_status_to_signal.fish @@ -1,4 +1,4 @@ -function __fish_status_to_signal --description "Print signal name from argument (\$status), or just argument" +function fish_status_to_signal --description "Print signal name from argument (\$status), or just argument" for arg in $argv if test $arg -gt 128 set -l signals SIGHUP SIGINT SIGQUIT SIGILL SIGTRAP SIGABRT SIGBUS \