Created
July 10, 2014 08:21
-
-
Save iorionda/7b70ecd8049a5fe2398e to your computer and use it in GitHub Desktop.
rake routes > peco
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 characters
| ################################################################################ | |
| # route-peco | |
| ################################################################################ | |
| route-peco() { | |
| rake --help > /dev/null 2>&1 | |
| if [[ $? == 0 ]]; then | |
| BUFFER="$(rake routes | peco --query "$LBUFFER")" | |
| CURSOR=$#BUFFER | |
| fi | |
| zle clear-screen | |
| } | |
| zle -N route-peco | |
| bindkey '^xr' route-peco |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment