-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
CLI: Support tilde (~) shortcut to user profile in -d argument #7454
Comments
Hey, this is a good idea. |
Looks like we can already open a Terminal tab that starts in |
That is cool, but it would be nice if it were clearer in the docs, because I was convinced the root for the -d parameter was "My PC" or "C:". |
As with all Windows applications, the root of any relative directory parameter is the current working directory. This means that if you run We opted not to document behavior that is either incidental or not a deviation from other applications :) |
Oh, that's what you meant! I thought you meant that the -d argument was always based on the current user's directory. If the base is the current command line directory, then my suggestion stands. What you describe makes perfect sense. But in the context of a startup shortcut, for example, the directory it runs from is not immediately obvious. Add in general, I don't think it's entirely safe to assume everyone will always be running the shell command line from their home folder. Also, there might be cases where a single shell file will be run by several users, who'd want the starting directory to be in -their- user folder. Finally, some people like to specify things when they're insecure about what the automatic behaviour would be. Simply mentioning the thing is sometimes simpler than researching the default behaviour, after all. For all these reasons, I think I'll stand behind my suggestion. |
Can I pick this up? |
I'm a little worried about this request. Treating IMO I'd want that question answered before we ship this. |
Maybe that should depend on the profile you're targeting? For instance, when opening a WSL profile we could treat |
Ah but how do we know for certain if they"re targeting a WSL profile? The user could make other WSL profiles other than the dynamically generated ones. In that case, we wouldn't have the /cc @DHowett since we've been having discussion about this in the past |
We might have low key done this unintentionally.
I mean, it makes sense. This should be in |
Description of the new feature/enhancement
Currently, if I want to open a Terminal tab that starts in a specific folder in my user profile, I have to write
-d C:\Users\MyUser\somefolder
. I wish I could use the shortcut ~ to say "that's my user folder".Proposed technical implementation details (optional)
For example, I could use the command
wt -d ~/somefolder
, which would be equivalent towt -d C:\Users\MyUser\somefolder
.The text was updated successfully, but these errors were encountered: