Scriptable Context Menu
Submitted by mitchell perilstein
Link to original bug (#349097)
Description
Inspired by Nautilus context menus:
When presenting the right-click context menu, if directory ~/.gnome2/gnome-terminal-scripts exists, then: present each file in that directory as a menu choice under a "Scripts" section.
If a script is chosen, it should be run with the current terminal selection (if small enough) as an argument. If there is no selection, the script is run with no arguments. The output of the script is pasted into the terminal.
Examples:
#!/bin/sh
script to insert some text into terminal
cat ~/.signature
#!/bin/sh
script to do some math on selected region and insert result
echo $(($1))