Skip to content

Commit

Permalink
[commands] allow space-separated keystrokes #2067
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw committed Oct 20, 2023
1 parent 6bf6a66 commit 8241cdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion visidata/cmdlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def repeat_for_selected(cmdlog, r):
globalCommand('^V', 'show-version', 'status(__version_info__);', 'Show version and copyright information on status line')
globalCommand('z^V', 'check-version', 'checkVersion(input("require version: ", value=__version_info__))', 'check VisiData version against given version')

globalCommand(' ', 'exec-longname', 'exec_longname(inputLongname())', 'execute command by its longname')
BaseSheet.addCommand('Space', 'exec-longname', 'exec_longname(inputLongname())', 'execute command by its longname')

CommandLog.addCommand('x', 'replay-row', 'vd.replayOne(cursorRow); status("replayed one row")', 'replay command in current row')
CommandLog.addCommand('gx', 'replay-all', 'vd.replay(sheet)', 'replay contents of entire CommandLog')
Expand Down
2 changes: 1 addition & 1 deletion visidata/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def addCommand(cls, keystrokes, longname, execstr, helpstr='', **kwargs):
'''
vd.commands.set(longname, Command(longname, execstr, helpstr=helpstr, module=vd.importingModule, **kwargs), cls)
if keystrokes:
vd.bindkeys.set(vd.prettykeys(keystrokes), longname, cls)
vd.bindkeys.set(vd.prettykeys(keystrokes.replace(' ', '')), longname, cls)
return longname

def _command(cls, binding, longname, helpstr, **kwargs):
Expand Down

0 comments on commit 8241cdc

Please sign in to comment.