I have a somewhat idiosyncratic CLI workflow, but it works for me. I commonly iterate on commands and then use the result of those commands in the next command. For example:
Finding a file:
$ ff thing_im_looking_for_spec ./specs/foo/bar/thing_im_looking_for_spec.rb
Re-running that command (since it's fast) and using it's result as an argument to another program:
$ rspec `!!`
...which expands to:
$ rspec `ff thing_im_looking_for_spec`
...and runs the test I'm looking for. From there I can press the up arrow and make a quick edit to:
$ vim `ff thing_im_looking_for_spec`
...to edit that file.
I know it's weird, but it works great. It's very comfortable for me to use [backtick][bang][bang][backtick] to mean "yeah, that thing."
But "`!!`" is just a wee bit hard to type. Is it possible to make an alias for it? I've had trouble figuring out how to do this because "`!!`" is itself an alias for the last command.