diff options
author | Nick Shipp <nick@shipp.ninja> | 2017-02-14 08:41:16 -0500 |
---|---|---|
committer | Nick Shipp <nick@shipp.ninja> | 2017-02-14 08:41:16 -0500 |
commit | 24a605577c8e09a75f8f717f9df1bdc6c8dd8ec3 (patch) | |
tree | 794db72af4e1ddf41cff2d1f6371b27103562d69 /zsh/functions.zsh |
initial commit
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 +} |