Sublime Forum

Filter text through Windows PowerShell plugin

#1

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…

0 Likes

#2

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 :smiley:

0 Likes

#3

Updated!

0 Likes

#4

Updated!

0 Likes

#5

Updated! + Moved package to Bitbucket.
http://bitbucket.org/guillermooo/powershellutils/

0 Likes

#6

Updated!

0 Likes

#7

Updated!

0 Likes

#8

Updated!

  • Multiple regions should be filtered much quicker now.
  • $args is no longer available; only $a contains each region’s text in turn.
0 Likes

#9

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.
0 Likes

#10

Updated!

Added documentation.

0 Likes