bang: idk, a fix
This commit is contained in:
parent
d267901ad8
commit
3140020d3b
11
bang.py
11
bang.py
|
@ -153,15 +153,18 @@ def main():
|
||||||
exit("Bad Rofi output.")
|
exit("Bad Rofi output.")
|
||||||
|
|
||||||
handle = parts[0]
|
handle = parts[0]
|
||||||
|
query = None
|
||||||
if handle not in handles and (default_handle := args.default):
|
if handle not in handles and (default_handle := args.default):
|
||||||
handle = default_handle
|
handle = default_handle
|
||||||
if len(parts) == 1:
|
if len(parts) == 1:
|
||||||
queries.append(parts[0])
|
query = parts[0]
|
||||||
else:
|
else:
|
||||||
queries.append(output)
|
query = output
|
||||||
|
elif len(parts) == 2:
|
||||||
|
query = parts[1]
|
||||||
|
|
||||||
if len(parts) == 2:
|
if query is not None:
|
||||||
queries.append(parts[1])
|
queries.append(query)
|
||||||
|
|
||||||
# If no queries were obtained during options parsing,
|
# If no queries were obtained during options parsing,
|
||||||
# show Rofi now to get a single query.
|
# show Rofi now to get a single query.
|
||||||
|
|
Loading…
Reference in a new issue