Skip to content

Commit 6560898

Browse files
authored
Merge pull request #617 from python-cmd2/completion
Added tab completion of paths to pyscript script arguments
2 parents 3a0c873 + ca6e929 commit 6560898

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd2/cmd2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3118,8 +3118,9 @@ def quit():
31183118
pyscript_parser = ACArgumentParser()
31193119
setattr(pyscript_parser.add_argument('script_path', help='path to the script file'),
31203120
ACTION_ARG_CHOICES, ('path_complete',))
3121-
pyscript_parser.add_argument('script_arguments', nargs=argparse.REMAINDER,
3122-
help='arguments to pass to script')
3121+
setattr(pyscript_parser.add_argument('script_arguments', nargs=argparse.REMAINDER,
3122+
help='arguments to pass to script'),
3123+
ACTION_ARG_CHOICES, ('path_complete',))
31233124

31243125
@with_argparser(pyscript_parser)
31253126
def do_pyscript(self, args: argparse.Namespace) -> None:

0 commit comments

Comments
 (0)