This mostly fixes some wrong indents or replaces some stray tab indents.

I excluded alignment on purpose, because we have a whole bunch of code
that goes like

```fish
complete -c foo -n 'some-condition'        -l someoption
complete -c foo -n 'some-longer-condition' -l someotheroption
```

and changing it seems like a larger thing and would include more
thrashing.

See #3622.
This commit is contained in:
Fabian Homborg
2019-11-16 14:57:59 +01:00
parent aae111584d
commit 330f1701d7
13 changed files with 321 additions and 316 deletions

View File

@@ -50,9 +50,10 @@ def is_wsl():
return True
return False
def is_termux():
""" Return whether we are running under the Termux application for Android"""
return 'com.termux' in os.environ['PATH'] and find_executable('termux-open-url')
return "com.termux" in os.environ["PATH"] and find_executable("termux-open-url")
# Disable CLI web browsers
@@ -1195,7 +1196,11 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_save_abbreviation(self, abbreviation):
out, err = run_fish_cmd(
# Remove one layer of single-quotes because escape_fish_cmd adds them back.
"abbr --add %s %s" % (escape_fish_cmd(abbreviation["word"].strip("'")), escape_fish_cmd(abbreviation["phrase"].strip("'")))
"abbr --add %s %s"
% (
escape_fish_cmd(abbreviation["word"].strip("'")),
escape_fish_cmd(abbreviation["phrase"].strip("'")),
)
)
if err:
return err