Skip to content

Instantly share code, notes, and snippets.

@sankitch
Created October 30, 2012 18:12
Show Gist options
  • Select an option

  • Save sankitch/3981972 to your computer and use it in GitHub Desktop.

Select an option

Save sankitch/3981972 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