Created
December 30, 2012 05:56
-
-
Save f440/4411204 to your computer and use it in GitHub Desktop.
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
| # -*- sh -*- | |
| zmodload zsh/parameter | |
| function zaw-src-gisty() { | |
| candidates=("${(ps:\n:)$(gisty list)}") | |
| actions=("zaw-callback-gisty-append-to-buffer") | |
| act_descriptions=("append to edit buffer") | |
| } | |
| zaw-register-src -n gisty zaw-src-gisty | |
| function zaw-callback-gisty-append-to-buffer() { | |
| local gitdir=`echo "${(j:; :)@}" | cut -d":" -f1` | |
| local destpath=$GISTY_DIR/$gitdir | |
| if [ -n "$gitdir" -a -d "$destpath" ] | |
| then | |
| LBUFFER="${BUFFER}${destpath}" | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment