diff --git a/shells/zshrc b/shells/zshrc index a8d9550..75aacee 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -351,11 +351,16 @@ mv() { /bin/mv -v "$@" } m() { mv "$@" } compdef _cp c cfat m mv cp adb apush apull paste() { - NAME="-d title=Command run at $(date '+%d/%h/%y %H:%M:%S') on $(hostname)" + local PRIVATE=0 + if [[ ! -z "$1" ]] && [[ "$1" -eq "-p" ]]; then + PRIVATE=1 + shift + fi + local NAME="-d title=Command run at $(date '+%d/%h/%y %H:%M:%S') on $(hostname)" if [[ ! -z "$1" ]]; then NAME="-d title=$1" fi - sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" | curl --data-urlencode text@- $NAME -d name=$USER -d expire="40320" https://austenwares.com/paste/api/create + sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" | curl --data-urlencode text@- $NAME -d name=$USER -d expire="40320" -d private="$PRIVATE" https://austenwares.com/paste/api/create } grename() { echo incomplete