From 02628d1b0256d87412a17909c2771f24c6dd6681 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sat, 26 Jan 2019 21:16:50 +0100 Subject: [PATCH] default_command_not_found_handler: Join arguments Without it, this would print the error multiple times, like Unknown command: echs Unknown command: 1 Unknown command: 2 Unknown command: 3 Fixes #5588. --- share/config.fish | 2 +- tests/invocation/broken-config-continues.err | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/config.fish b/share/config.fish index 18242e06a..e67a1f1e7 100644 --- a/share/config.fish +++ b/share/config.fish @@ -12,7 +12,7 @@ or set -g __fish_added_user_paths # Create the default command_not_found handler # function __fish_default_command_not_found_handler - printf "fish: Unknown command '%s'\n" (string escape -- $argv) >&2 + printf "fish: Unknown command %s\n" (string escape -- "$argv") >&2 end if status --is-interactive diff --git a/tests/invocation/broken-config-continues.err b/tests/invocation/broken-config-continues.err index d313eb7f7..5ab2906b6 100644 --- a/tests/invocation/broken-config-continues.err +++ b/tests/invocation/broken-config-continues.err @@ -1,4 +1,4 @@ -fish: Unknown command 'syntax-error' +fish: Unknown command syntax-error $XDG_CONFIG_HOME/fish/config.fish (line 2): syntax-error ^