Show error message when save_as_session has too many path arguments
This commit is contained in:
parent
e7aa197b27
commit
8e76a62815
1 changed files with 4 additions and 0 deletions
|
|
@ -719,6 +719,10 @@ def default_save_as_session_opts() -> SaveAsSessionOptions:
|
|||
|
||||
def save_as_session(boss: BossType, cmdline: Sequence[str]) -> None:
|
||||
opts, args = parse_save_as_options_spec_args(list(cmdline))
|
||||
if args and len(args) > 1:
|
||||
boss.show_error(_('Invalid save_as_session command line'), _(
|
||||
'save_as_session must have no more than a single path argument. Note that any flags/options should come before the path'))
|
||||
return
|
||||
path = args[0] if args else ''
|
||||
if path == '.':
|
||||
sn = boss.active_session
|
||||
|
|
|
|||
Loading…
Reference in a new issue