Skip to content

Commit 8241cdc

Browse files
committed
[commands] allow space-separated keystrokes #2067
1 parent 6bf6a66 commit 8241cdc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

visidata/cmdlog.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ def repeat_for_selected(cmdlog, r):
471471
globalCommand('^V', 'show-version', 'status(__version_info__);', 'Show version and copyright information on status line')
472472
globalCommand('z^V', 'check-version', 'checkVersion(input("require version: ", value=__version_info__))', 'check VisiData version against given version')
473473

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

476476
CommandLog.addCommand('x', 'replay-row', 'vd.replayOne(cursorRow); status("replayed one row")', 'replay command in current row')
477477
CommandLog.addCommand('gx', 'replay-all', 'vd.replay(sheet)', 'replay contents of entire CommandLog')

visidata/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def addCommand(cls, keystrokes, longname, execstr, helpstr='', **kwargs):
313313
'''
314314
vd.commands.set(longname, Command(longname, execstr, helpstr=helpstr, module=vd.importingModule, **kwargs), cls)
315315
if keystrokes:
316-
vd.bindkeys.set(vd.prettykeys(keystrokes), longname, cls)
316+
vd.bindkeys.set(vd.prettykeys(keystrokes.replace(' ', '')), longname, cls)
317317
return longname
318318

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

0 commit comments

Comments
 (0)