From afd242b14d09154bb1ec84eb7faf8692416eba75 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Sun, 1 Jan 2023 10:57:25 +0100 Subject: [PATCH] fish_config: Skip backing up prompt This would print an ugly but benign error --- share/functions/fish_config.fish | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/functions/fish_config.fish b/share/functions/fish_config.fish index 5ce74fbb1..3989ec731 100644 --- a/share/functions/fish_config.fish +++ b/share/functions/fish_config.fish @@ -106,7 +106,10 @@ function fish_config --description "Launch fish's web based configuration" read -P"Overwrite prompt? [y/N]" -l yesno if string match -riq 'y(es)?' -- $yesno echo Overwriting - cp $__fish_config_dir/functions/fish_prompt.fish{,.bak} + # Skip the cp if unnecessary, + # or we'd throw an error on a stock fish. + path is $__fish_config_dir/functions/fish_prompt.fish + and cp $__fish_config_dir/functions/fish_prompt.fish{,.bak} set -l have if set -q argv[1]