Skip to content

Instantly share code, notes, and snippets.

@ponko2
Created January 9, 2012 11:40
Show Gist options
  • Select an option

  • Save ponko2/1582601 to your computer and use it in GitHub Desktop.

Select an option

Save ponko2/1582601 to your computer and use it in GitHub Desktop.
.git ディレクトリを除外して find を行えるようにする関数 ref: http://qiita.com/items/1615
function git-find() {
find $1 \( -type d -name '.git' -prune \) -or \( $*[2,-1] -print \)
}
function git-find0() {
find $1 \( -type d -name '.git' -prune \) -or \( $*[2,-1] -print0 \)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment