Use the last command\’s output as input to a command without piping and
bind to it to a key sequence in bash.
bind \'"\\C-h": "\\`fc\\ \\-s\\`"\'
My comment : fc is the fix command of the bash builtin.
This is similar to using `!!` or
In bash 4.1 it seems you can bind directly to a shell command, but I\’m
not running that version.
* View this command to comment, vote or add to favourites
* View all commands by rthemocap
by David Winterbottom (codeinthehole.com)
Related articles by Zemanta
- Google Translate | commandlinefu.com (commandlinefu.com)
- Git Bash Prompt (nofluffjuststuff.com)
- Writing Better Shell Scripts – Part 1 | Innovations Technology Solutions | Blog (innovationsts.com)
- The Tar Pipe (extracheese.org)