diff options
author | Fabian Homborg <FHomborg@gmail.com> | 2016-05-19 17:49:09 +0200 |
---|---|---|
committer | Fabian Homborg <FHomborg@gmail.com> | 2016-05-23 19:59:02 +0200 |
commit | 46f4819ffade061d202973996e4974562a45ecd0 (patch) | |
tree | 2a16758465c3ccb9aa3009a67ba78dee5097501b | |
parent | c238ad35bdd065dc9bda13ad840f1b47c325971b (diff) |
Fix printing "--" in abbr --show
-rw-r--r-- | share/functions/abbr.fish | 3 |
1 files changed, 2 insertions, 1 deletions
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 |