]> git.donarmstrong.com Git - zsh.git/blob - .zsh/func/p
add ~/.local/bin to PATH
[zsh.git] / .zsh / func / p
1 #!/bin/zsh
2 #
3 # func/p
4 #
5 # function to publish to a pastebin (using pastebinit)
6 #
7 # Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
8 # Released under the terms of the Artistic Licence 2.0
9 #
10 # Source repository: git://git.madduck.net/etc/zsh.git
11 #
12
13 if [[ $# -gt 1 ]]; then
14   echo E: only one argument can be passed. >&2
15   exit 1
16 fi
17
18 PERMATAG=$USER
19 PB=http://slexy.org
20 PBIT="pastebinit -b $PB -a $USER"
21
22 FILE=-
23 [[ -n "$1" ]] && FILE="$1"
24
25 eval $PBIT -i $FILE | sed -e s@/view/@/raw/@