-
-
Save aerosol/309cd68d1d93196276664d232201456e 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
#!/usr/bin/env zsh | |
function edit() { | |
mkdir -p "$(dirname "$1")" && $EDITOR "$1" | |
} | |
function pick() { | |
note=$(rg . | fzf --preview "cat \$(echo {} | tr ':' '\n' | head -n1)" | awk -F: '{print $1}') | |
if [[ -n $note ]] | |
then | |
less $note | xsel --clipboard --input | |
fi | |
} | |
function count() { | |
ls "$1" | wc -l | |
} | |
notesdir=~/notes | |
(cd $notesdir && $*) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment