-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand ~
when parsing file paths in :open
#5329
Expand ~
when parsing file paths in :open
#5329
Conversation
helix-term/src/args.rs
Outdated
let def = || (PathBuf::from(s), Position::default()); | ||
let def = || { | ||
( | ||
helix_core::path::expand_tilde(Path::new(s)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to call this from open
in helix-term/src/commands/typed.rs
. We don't need to do this for files passed in the argv since the shell will do the tilde expansion and there's a small bug here where :open
fails if you give it a directory that has a tilde and a row or row/col position (though that isn't a use-case that makes sense)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, makes sense 👍
~
when parsing file paths~
when parsing file paths in :open
Addresses #5322.
Expected
:open
should work on directories with~
in the filepath (i.e. file picker dialog opens)helix1fix.mov