mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-02 11:01:15 -03:00
web_config: fix output if no abbreviations defined
This commit is contained in:
@@ -687,8 +687,12 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
lines = (x for x in out.rstrip().split('\n'))
|
||||
# Turn the output into something we can use
|
||||
abbrout = (line[len('abbr -a '):].strip('\'') for line in lines)
|
||||
abbrs = (x.split('=') for x in abbrout)
|
||||
result = [{'word': x, 'phrase': y} for x, y in abbrs]
|
||||
abbrs = [x.split('=') for x in abbrout]
|
||||
|
||||
if abbrs[0][0]:
|
||||
result = [{'word': x, 'phrase': y} for x, y in abbrs]
|
||||
else:
|
||||
result = []
|
||||
return result
|
||||
|
||||
def secure_startswith(self, haystack, needle):
|
||||
|
||||
Reference in New Issue
Block a user