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)
202202 tbl << [ key , value ]
203203 end
204204
205+ tbl << [ '.<command>' , "Prefix any built-in command on this list with a '.' to execute in the underlying shell (ex: .help)" ]
206+
205207 print ( tbl . to_s )
206208 print ( "For more info on a specific command, use %grn<command> -h%clr or %grnhelp <command>%clr.\n \n " )
207209 end
@@ -607,8 +609,13 @@ def run_single(cmd)
607609 end
608610
609611 # 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
612619 end
613620
614621 # User input is not a built-in command, write to socket directly
You can’t perform that action at this time.
0 commit comments