Skip to content

Instantly share code, notes, and snippets.

@opexxx
Forked from sankitch/search-document-by-percol.zsh
Last active September 4, 2015 10:31
Show Gist options
  • Select an option

  • Save opexxx/c205a7b3ff021e5c6de1 to your computer and use it in GitHub Desktop.

Select an option

Save opexxx/c205a7b3ff021e5c6de1 to your computer and use it in GitHub Desktop.
ドキュメントを絞り込んで開く
function search-document-by-percol() {
DOCUMENT_DIR="$HOME/Dropbox/Documents/ $HOME/Desktop/ $HOME/Google\ ドライブ"
SELECTED_FILE=$(echo $DOCUMENT_DIR | xargs find | \
grep -E "\.(xlsx|xls|pptx|ppt|docx|doc|pdf|txt|odp|odt|ods|xmind|mm|glink|gsheet)$" | percol --match-method migemo)
if [ $? -eq 0 ]; then
cygstart $SELECTED_FILE
fi
}
alias sd='search-document-by-percol'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment