diff options
Diffstat (limited to 'zsh/functions.zsh')
-rw-r--r-- | zsh/functions.zsh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/zsh/functions.zsh b/zsh/functions.zsh new file mode 100644 index 0000000..6bd9482 --- /dev/null +++ b/zsh/functions.zsh @@ -0,0 +1,27 @@ +function mpod { + mcpan pod $1 | $PAGER -c 'set ft=perldoc' +} + +function msrc { + mcpan src $1 | $PAGER -c 'set ft=perl' +} + +function scratch { + local tmp + tmp=$(mktemp --suffix=.$1) + vim -c 'set ft='$1 $tmp + rm $tmp +} + +function note { + local note + pushd + cd ~/notes + note=(${(@f)$(fzf --print-query)}) + if [[ -f $note[2] ]]; then + $VISUAL $note[2] + else + $VISUAL $note[1] + fi + popd +} |