From 46f4819ffade061d202973996e4974562a45ecd0 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 19 May 2016 17:49:09 +0200 Subject: Fix printing "--" in abbr --show --- share/functions/abbr.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/functions/abbr.fish b/share/functions/abbr.fish index 6f1df7e6..beaeda30 100644 --- a/share/functions/abbr.fish +++ b/share/functions/abbr.fish @@ -116,13 +116,14 @@ function abbr --description "Manage abbreviations" case 'show' for i in $fish_user_abbreviations + set -l opt_double_dash set -l kv (string split " " -m 1 -- $i) set -l key $kv[1] set -l value $kv[2] # Check to see if either key or value has a leading dash # If so, we need to write -- - string match -q -- '-*' $key $value; and set -l opt_double_dash '--' + string match -q -- '-*' $key $value; and set opt_double_dash '--' echo abbr $opt_double_dash (string escape -- $key $value) end return 0 -- cgit v1.2.3