Home Download Buy Blog Forum Support

Filter text through Windows PowerShell plugin

Filter text through Windows PowerShell plugin

Postby guillermooo on Sat Mar 06, 2010 12:31 pm

This package has been moved to Bitbucket. You can find it here:
http://bitbucket.org/guillermooo/powershellutils/

I use Windows Powershell quite a lot, so I've put together a ST plugin to filter the selected region(s) through a PS command.

EDIT: Supressed child process window.
EDIT: Added note about how to start a subshell without blocking Sublime Text forever.
EDIT: Added WindowsError info to error message + extended docstring.
EDIT: Non-ascii languages supported (Python + UTF-8 + Windows + BOMs = REALLY HARD HEADACHE); hope it helps somebody! Also, I think I should stop doing version control on the forum.
EDIT: Now non-ascii strings passed to Powershell should really be interpreted correctly...
Last edited by guillermooo on Thu Mar 18, 2010 7:47 pm, edited 10 times in total.
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Filter text through Windows PowerShell plugin

Postby EJ12N on Mon Mar 08, 2010 1:41 am

nice! This can gives users an idea on how to pipe through selected text to any program, given that they modify it to suit their needs of course.

Good one :D
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: Filter text through Windows PowerShell plugin

Postby guillermooo on Sun Mar 14, 2010 11:23 pm

Updated!
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Filter text through Windows PowerShell plugin

Postby guillermooo on Mon Mar 15, 2010 9:53 pm

Updated!
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Filter text through Windows PowerShell plugin

Postby guillermooo on Thu Mar 18, 2010 7:48 pm

Updated! + Moved package to Bitbucket.
http://bitbucket.org/guillermooo/powershellutils/
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Filter text through Windows PowerShell plugin

Postby guillermooo on Mon Apr 12, 2010 9:55 pm

Updated!
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Filter text through Windows PowerShell plugin

Postby guillermooo on Fri Apr 16, 2010 10:35 pm

Updated!
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Filter text through Windows PowerShell plugin

Postby guillermooo on Sat Apr 17, 2010 9:51 am

Updated!

* Multiple regions should be filtered much quicker now.
* $args is no longer available; only $a contains each region's text in turn.
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Filter text through Windows PowerShell plugin

Postby guillermooo on Sun Apr 18, 2010 9:22 pm

Updated!

* Selected text is now available in the $_ automatic variable in the pipeline, as it's standard in PoSh.
* Managed to fix bugs instead of breaking everything.
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Filter text through Windows PowerShell plugin

Postby guillermooo on Sat May 15, 2010 8:47 pm

Updated!

Added documentation.
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: Exabot [Bot] and 5 guests