Warpzone is a *nix shell program that enables you to "warp back" to a parent shell in order to execute a piped command in that context rather than your current environment. Note: I wrote/use this under Cygwin, your mileage may vary.
It functions by inserting itself in your input stream and giving you a child shell (bash only at the moment). It appends a green pipe symbol to your bash prompt in order to remind you that it is present.
The hotkey to activate warpzone is alt-| (technically alt-\, because I did not want to enforce shift-alt-\). When you press alt-| a green | will be drawn. At that point you are chaining commands for the parent shell. Once you hit enter, warpzone will send an enter to the child shell (to execute the commands to the left of the green |, wait until the output from that shell has been idle for 0.2 seconds, and then send that output to the parent shell to be piped through the commands that were to the right of the green |. The output from that pipestream will then be visible on your stdout.
The short version - once you're inside of warpzone, if you use alt-| to pipe commands, they run as if you were in the parent shell that you launched warpzone from.
The intended use case is (for instance) to be able to use advanced unix string utilities despite being in a more restrictive environment. Specifically, I wrote this too to enable me to use my custom utilities such as ips, macdb and no (not to mention actual honest-to-god grep) while shelled into Cisco equipment.
This is very much a 0.1 version, expect bugs. In particular - there are a lot of bits and boops involved in passing control correctly and settings between TTYs that I simply don't understand. It seems to work ok for my prime use case - which is to go one shell deeper and use a very basic (in terms of terminal codes, goofy vt100 drawing, anything like that) shell. If any gray beards would like to pop in and school me on how to make this flawless I'd be more than happy to say hello.
Update: 0.2 - Dec 28 2018. I've fixed an issue with this program reusing the escape sequence of alt-\ with (for instance) emacs setting up its graphical console by switching our activation sequence from alt-\ to space-alt-\. It should function identically, you just need to preceed the | with a space. I've also jazzed up the output slightly. Still need to get it to obey all the tty stuff flawlessly...
Note: (to self) Just use "resize" for now until resizing is solved
Current status - this isn't quite good enough for me to eat my own dogfood, it has some issues with e.g. terminal paging that I still need to work out.
Cisco-ASA# show arp | macdb outside (ip redacted) a493.4cxx.xxxx 7925 OUI: (hex) Cisco Systems, Inc inside (ip redacted) 000c.29xx.xxxx 56 OUI: (hex) VMware, Inc. inside (ip redacted) 406c.8fxx.xxxx 100 OUI: (hex) Apple, Inc. inside (ip redacted) 0015.faxx.xxxx 9530 OUI: (hex) Cisco Systems, Inc dmz (ip redacted) 000c.29xx.xxxx 1 OUI: (hex) VMware, Inc. dmz (ip redacted) 000c.29xx.xxxx 3 OUI: (hex) VMware, Inc. dmz (ip redacted) 000c.29xx.xxxx 4 OUI: (hex) VMware, Inc. dmz (ip redacted) 000c.29xx.xxxx 8 OUI: (hex) VMware, Inc. dmz (ip redacted) 000c.29xx.xxxx 10 OUI: (hex) VMware, Inc. dmz (ip redacted) 000c.29xx.xxxx 14 OUI: (hex) VMware, Inc.
Listing directory https://download.elifulkerson.com/files/warpzone/0.2: warpzone.c December 28 2018 19:47:22 12881 C source, UTF-8 Unicode text warpzone.c.asc December 28 2018 19:48:04 801 GnuPG signature warpzone.c.md5 December 28 2018 19:48:04 45 MD5 checksum warpzone.c.sha1 December 28 2018 19:48:04 53 SHA1 checksum warpzone.c.sha256 December 28 2018 19:48:04 77 SHA256 checksum warpzone.c.sha512 December 28 2018 19:48:04 141 SHA512 checksum ↩ Browse the download server
To compile: gcc -o warpzone.exe warpzone.c
I would like to thank R. Koucha for his pty examples (http://www.rkoucha.fr/tech_corner/pty_pdip.html) on which this program was based.