Skip to content

Commit af97963

Browse files
committed
In shell mode, auto-expand all cmd arguments so ~ works.
Closes #22181
1 parent 23da960 commit af97963

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

base/client.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ function repl_cmd(cmd, out)
3434
shell = shell_split(get(ENV, "JULIA_SHELL", get(ENV, "SHELL", "/bin/sh")))
3535
shell_name = Base.basename(shell[1])
3636

37+
# Immediately expand all arguments, so that typing e.g. ~/bin/foo works.
38+
cmd.exec .= expanduser.(cmd.exec)
39+
3740
if isempty(cmd.exec)
3841
throw(ArgumentError("no cmd to execute"))
3942
elseif cmd.exec[1] == "cd"

0 commit comments

Comments
 (0)