Pipe in and out of $EDITOR
.
Finally your editor is a real unix fellow, even if it doesn't support pipes at all.
See also https://github.com/juliangruber/go-vipe.
# This will open an editor with the text "change me" loaded
$ echo change me | vipe | tr '[:upper:]' '[:lower:]'
CHANGED
$ npm install -g juliangruber/vipe
This is a lightweight bash only version. For the original impementation in Perl, check https://github.com/madx/moreutils/blob/master/vipe.
With those functions in your ~/.bash_profile
(change username):
cipherup(){
cipherhub juliangruber | gist -pR | cut -d/ -f1-5
}
cipheredit(){
curl -sL $1/raw | cipherhub | vipe | cipherhub juliangruber | gist -u $1
}
Store some secret data in a gist:
$ echo some secrets | cipherup
<GIST-URL>
And edit it again:
$ cipheredit <GIST-URL>
MIT