Skip to content

Commit

Permalink
add new source, git-files
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamuray committed Feb 24, 2011
1 parent b9a9c11 commit a2d1172
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sources/git-files.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function zaw-src-git-files() {
git rev-parse --git-dir >/dev/null 2>&1
if [[ $? == 0 ]]; then
candidates=("${(ps:\0:)$(git ls-files -z)[1,-2]}")
fi
actions=("zaw-callback-edit-file" "zaw-callback-append-to-buffer")
act_descriptions=("edit file" "append to edit buffer")
}

zaw-register-src -n git-files zaw-src-git-files

0 comments on commit a2d1172

Please sign in to comment.