Skip to content

Commit

Permalink
Expand ~ when parsing file paths in :open (helix-editor#5329)
Browse files Browse the repository at this point in the history
  • Loading branch information
iobtl authored and hadronized committed Jan 4, 2023
1 parent d551a05 commit a7f6405
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions helix-term/src/commands/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ fn open(cx: &mut compositor::Context, args: &[Cow<str>], event: PromptEvent) ->
ensure!(!args.is_empty(), "wrong argument count");
for arg in args {
let (path, pos) = args::parse_file(arg);
let path = helix_core::path::expand_tilde(&path);
// If the path is a directory, open a file picker on that directory and update the status
// message
if let Ok(true) = std::fs::canonicalize(&path).map(|p| p.is_dir()) {
Expand Down

0 comments on commit a7f6405

Please sign in to comment.