Skip to content

Commit 0f5a1b9

Browse files
committed
optargs: handle -- case
1 parent 6a7fe88 commit 0f5a1b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

builtin/pure_osh.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,10 @@ def _GetOpts(
506506
my_state.Fail()
507507
return 1, '?'
508508

509+
if current == "--": # special case, stop processing remaining args
510+
my_state.IncIndex()
511+
return 1, '?'
512+
509513
flag_char = current[my_state.flag_pos]
510514

511515
if my_state.flag_pos < len(current) - 1:

0 commit comments

Comments
 (0)