Skip to content

Commit

Permalink
Replace reference to top level option_aliases
Browse files Browse the repository at this point in the history
It has been moved into the VisiData object, in
ce497f4
  • Loading branch information
dbaynard committed Jul 15, 2023
1 parent 3480874 commit 9fb67d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dev/zsh-completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

sys.path.insert(0, dirn(dirn((os.path.abspath(__file__)))))
from visidata import vd
from visidata.main import option_aliases

ZSH_COMPLETION_FILE = "_visidata"
ZSH_COMPLETION_TEMPLATE = "dev/zsh-completion.in"
Expand All @@ -18,7 +17,9 @@

def generate_completion(opt):
prefix = "--" + opt.name
shortnames = [key for key, value in option_aliases.items() if value[0] == opt.name]
shortnames = [
key for key, value in vd.option_aliases.items() if value[0] == opt.name
]
if len(shortnames):
if len(shortnames[0]) == 1:
shortname = "-" + shortnames[0]
Expand Down

0 comments on commit 9fb67d1

Please sign in to comment.