]> git.donarmstrong.com Git - zsh.git/blob - .zsh/zshrc/40_paste
remove ssh stuff (goes to ssh repo)
[zsh.git] / .zsh / zshrc / 40_paste
1 # zshrc/40_paste
2 #
3 # adapters for rafb.pl
4 #
5 # Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
6 # Released under the terms of the Artistic Licence 2.0
7 #
8 # Source repository: http://git.madduck.net/v/etc/zsh.git
9 #
10
11 p()
12 {
13   local url
14   eval url="$($BINDIR/rafb -n $USERNAME -d 'paste by $USERNAME' $*)"
15   [[ -z $url ]] && return 1
16   echo "${url:r}.txt"
17 }
18
19 vp()
20 {
21   local tmpfile="$(vit)"
22   setopt localtraps
23   trap "rm -f '$tmpfile'" 0
24   p "$tmpfile"
25 }
26
27 # vim:ft=zsh