File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,8 @@ def cmd_help(*args)
202
202
tbl << [ key , value ]
203
203
end
204
204
205
+ tbl << [ '.<command>' , "Prefix any built-in command on this list with a '.' to execute in the underlying shell (ex: .help)" ]
206
+
205
207
print ( tbl . to_s )
206
208
print ( "For more info on a specific command, use %grn<command> -h%clr or %grnhelp <command>%clr.\n \n " )
207
209
end
@@ -607,8 +609,13 @@ def run_single(cmd)
607
609
end
608
610
609
611
# Built-in command
610
- if commands . key? ( method )
611
- return run_builtin_cmd ( method , arguments )
612
+ if commands . key? ( method ) or ( not method . nil? and method [ 0 ] == '.' and commands . key? ( method [ 1 ..-1 ] ) )
613
+ # Handle overlapping built-ins with actual shell commands by prepending '.'
614
+ if method [ 0 ] == '.' and commands . key? ( method [ 1 ..-1 ] )
615
+ return shell_write ( cmd [ 1 ..-1 ] + command_termination )
616
+ else
617
+ return run_builtin_cmd ( method , arguments )
618
+ end
612
619
end
613
620
614
621
# User input is not a built-in command, write to socket directly
You can’t perform that action at this time.
0 commit comments