Forked from stevendanna/gist:a10ac5540743d233d26b
Last active
August 29, 2015 14:10
-
-
Save jtimberman/6a174fc00c043e3ef1e0 to your computer and use it in GitHub Desktop.
Revisions
-
stevendanna created this gist
Dec 4, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ save-last-command() { last_command=$(fc -nl 0) command_name="$1" read -r -d '' new_fun <<EOF ${command_name}() { $last_command } EOF eval "$new_fun" }