-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Extension: Pipe output to command palette in Terminal #8797
Comments
This comment has been minimized.
This comment has been minimized.
~Hokay so it's not this simple. We'd need the proposed WAIT what
EDIT: It definitely was that. If you change the wt.exe shim to |
This is basically the complete #8797.
Remaining TODOS:
<unbelievably wack idea>
Maybe that would work as a combo with #9994 and #5970 {
"command": {
"action": "executeActions",
"subcommand": "cd",
"actions": [
{ "action":"sendInput", "input": "dir /b /ad | wt sl --prefix cd --suffix \"; wt cd\"\n"}
]
},
"name": "change directory..."
}, so that would cause |
Just a thought on this. fzf already does this very well and works everywhere. |
@cpriest Yea, I was mostly just messing around with this to see if this particular combination of things would work directly in the Terminal. It was more of an experiment than anything else. Almost more as a thought experiment more than anything else, but having the actual prototype in front of me was fun to play with and see what else we could do with something similar. |
As a possibly related combination of wack ideas: AS mentioned in #4719
wack idea:
where Though, it does seem easier to just
This all might be fully impossible with the new process model v3 as of 1.18. The wt that's run is a different process than the current one, so it'd be hard to plumb the HANDLE to the right place... |
Okay, this is gonna sound crazy so bear with me. I was switching git branches, and thought, "I really do not know how to use
less
well, andgit branch | $ grep foo
each time is annoying".Then I thought, we've got this great command palette for filtering a list of things.
As an extension, what if we could pipe a list of items to the terminal, and then have the terminal open up the command palette with those items populated in it. Then selecting one of those items would insert that text?
So something like:
would pipe to the current window, into the command palette.
--prefix "git checkout "
would indicate "use this text as a prefix for whatever the selected item was".So hitting enter on one of these items, like "dev/migrie/foo" would
SendInput
git checkout dev/migrie/foo
to the terminal.This encapsulates a bunch of things:
command paletteFilterableListView with whatever they want (a set of actions in this case. The actions would all be {sendInput(prefix+item), name=item})The text was updated successfully, but these errors were encountered: