From 4115a2f2d115d97d77f2bd81609c6756acbeab2e Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 14 Jun 2015 14:08:10 -0700 Subject: Tweak and add tests for abbr 1. When run with no arguments, make abbr do the equivalent of `abbr --show` 2. Enable "implicit add", e.g. `abbr gco git checkout` 3. Teach `abbr --show` to not use quotes for simple cases 4. Teach abbr to output -- when the abbreviation has leading dashes Add some basic tests to abbr too. --- share/tools/web_config/webconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share/tools') diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py index c122f587..359946ae 100755 --- a/share/tools/web_config/webconfig.py +++ b/share/tools/web_config/webconfig.py @@ -709,7 +709,7 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): return True def do_save_abbreviation(self, abbreviation): - out, err = run_fish_cmd('abbr --add \'%s %s\'' % (abbreviation['word'], abbreviation['phrase'])) + out, err = run_fish_cmd('abbr --add -- \'%s %s\'' % (abbreviation['word'], abbreviation['phrase'])) if err: return err else: -- cgit v1.2.3