Chris's Wiki :: blog/unix/SamWhyILikeIt Commentshttps://utcc.utoronto.ca/~cks/space/blog/unix/SamWhyILikeIt?atomcommentsDWiki2016-08-08T13:15:32ZRecent comments in Chris's Wiki :: blog/unix/SamWhyILikeIt.By Christian Neukirchen on /blog/unix/SamWhyILikeIttag:CSpace:blog/unix/SamWhyILikeIt:7883e6f31b99fd0a99ae76bee57ee48631abe283Christian Neukirchenhttp://chneukirchen.org/<div class="wikitext"><p>For the emacs users, I have written a function "bang"
in <a href="http://chneukirchen.org/dotfiles/.emacs">http://chneukirchen.org/dotfiles/.emacs</a> which is more sam-like:</p>
<pre>
Smartly execute string COMMAND in inferior shell.
</pre>
<pre>
When COMMAND starts with
< the output of COMMAND replaces the current selection
> COMMAND is run with the current selection as input
| the current selection is filtered through COMMAND
! COMMAND is simply executed (same as without any prefix)
Inside COMMAND, % is replaced with the current file name.
</pre>
</div>2016-08-08T13:15:32Z