-
Notifications
You must be signed in to change notification settings - Fork 234
Enable piping text to psedit
to open a new untitled buffer
#414
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
Comments
It would be cool if we could get this in 1.6.0. I'd love to see if I could get this working. |
This would definitely fit with a |
That'd be great! |
Now that we've changed |
Open-EditorFile |
From a maintenance point of view, it would be much nicer to edit those functions as PowerShell script vs C# strings. :-) Although, would we ship the module only with PSES? Would there be any need to put it on PSGallery? |
@rkeithhill even if we only ship it with PSES, it's probably still cleaner to pull the strings out into it's own PowerShell script. That said, it could go on the gallery and then brought in for a release. That way we could separate it into its own repo. I wonder how testing that module would work. 🤔 |
I feel like I'm missing something. Those strings are just implementation detail for creating/cleaning up the function that opens files in remote sessions. Most of them aren't actually functions. I'm all for getting the functions you listed implemented though. But I'd be hesitant to load them into every runspace we enter. |
Right, we're talking about expanding on the function that opens files. I'd rather not implement other functions (like That also enables us to add other functions like the ones I mentioned above. We'd just add them to the module rather than messing with strings in C#. |
what's the issue loading them into every runspace? It's not that much logic, is it? I think your hesitation is valid though which got me thinking... what if *-EditorFile was a totally separate module and the user had the option to install it or not. They could install it via ^ (half thought - not fully thought out) |
@tylerl0706 Oh yeah they should definitely be in a module. Anything the user would actually call I think.
I guess it depends on what they do. For most things we'd need to set up events to forward back to the main session. If it was just loading functions then yeah it'd probably be fine. |
Now I feel like I'm missing something 😄
Are you saying psedit can't go in "commands"? If so why can't it? If it can, I think it totally should go in commands. |
@tylerl0706 it most certainly can, in fact it already is :P I was talking about the proxy psedit for remote sessions |
I see. So I guess the question is, what would we want to be loaded in a remote session? I would think maybe Side thought, do you think we could get away with folding new file creation into Maybe that's not PowerShell-y 🤔 |
Actually if open created files with a |
and piping content into |
irm mysite.com/foo.ps1 | open-editorfile foo.ps1 -force |
Yeah, |
It should be possible to pipe text from an arbitrary command into
psedit
to open a new untitled file buffer. For example:Get-Process | psedit
The text was updated successfully, but these errors were encountered: