File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ module IRB
10
10
module ExtendCommand
11
11
class Ls < Nop
12
12
def self . transform_args ( args )
13
- if match = args &.match ( /\A (?<args>.+\s |)(--grep |-G)\s +(?<grep>[^\s ]+)\s *\n \z / )
13
+ if match = args &.match ( /\A (?<args>.+\s |)(-g |-G)\s +(?<grep>[^\s ]+)\s *\n \z / )
14
14
args = match [ :args ]
15
15
"#{ args } #{ ',' unless args . chomp . empty? } grep: /#{ match [ :grep ] } /"
16
16
else
Original file line number Diff line number Diff line change @@ -489,7 +489,7 @@ def test_ls_grep
489
489
490
490
[
491
491
"ls 42, grep: /times/\n " ,
492
- "ls 42 --grep times\n " ,
492
+ "ls 42 -g times\n " ,
493
493
"ls 42 -G times\n " ,
494
494
] . each do |line |
495
495
out , err = execute_lines ( line )
@@ -508,7 +508,7 @@ def test_ls_grep_empty
508
508
509
509
[
510
510
"ls grep: /whereami/\n " ,
511
- "ls --grep whereami\n " ,
511
+ "ls -g whereami\n " ,
512
512
"ls -G whereami\n " ,
513
513
] . each do |line |
514
514
out , err = execute_lines ( line )
You can’t perform that action at this time.
0 commit comments