Skip to content
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

click on subdirectory name to change to that directory #9661

Closed
cmruffin opened this issue Mar 30, 2021 · 2 comments
Closed

click on subdirectory name to change to that directory #9661

cmruffin opened this issue Mar 30, 2021 · 2 comments
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity.

Comments

@cmruffin
Copy link

Description of the new feature/enhancement

I work with deep subdirectories of source code. When working in these source trees, I am giving myself carpal tunnel typing cd ........... . It would be fantastic! If you could click on the name of a subdirectory to change to that directory.

@cmruffin cmruffin added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Mar 30, 2021
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Mar 30, 2021
@zadjii-msft
Copy link
Member

This is a neat idea! But I wonder, how would it possibly work? The only way I could possibly imagine is with some sort of extension[1] to OSC 8. This extension would let the client app not just specify a URL for a string of text, but also give some sort of string of text that should be input if the user clicks on it.

Then, that would allow the shell application (cmd, powershell, bash, etc) emit each part of a path as a version of this sequence. So cmd would need to emit something like:

^[]9001;1;cd C:\^[\
C:\
^[]9001;1;^[\
^[]9001;1;cd C:\Foo^[\
Foo\
^[]9001;1;^[\
^[]9001;1;cd C:\Foo\Bar^[\
Bar\
^[]9001;1;^[\

(etc)

To identify each part of the path as a link to a different string of input to send. It's UNBELIEVABLY chatty, but I suppose it would work.

Then, we'd also need every shell to them opt-in to sending sequences like these. Which is:

  • 100% impossible for cmd.exe
  • 100% impossible for Windows PowerShell
  • Maybe possible for PowerShell 7+ / PSReadline
  • Unlikely for bash/fish/zsh, unless the user adds them to their .bashrc (or equivalent) themselves

Unless there's an obvious way to do this that I'm missing. The trick here being "Click on a part of a path to go to that directory". It's easy to have a regex that lets you click on a whole path to perform some action in response to that whole path. It's hard(impossible?) to have the regex let you click on a subset of a path, and know the whole path that came before it. We'd somehow need to independently match C:\, C:\Foo, C:\Foo\Bar, C:\Foo\Bar\Baz as four simultaneous matches for the same region of text, and only allow the shortest version to be the clickable one.

I think it's a neat idea, but I'm going to need any sort of technical proposal for achieving this before I'll put it on the backlog.

[1]: by "extension" I mean entirely new sequence

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Mar 30, 2021
@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Apr 3, 2021
@ghost
Copy link

ghost commented Apr 3, 2021

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost ghost closed this as completed Apr 6, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity.
Projects
None yet
Development

No branches or pull requests

2 participants