add check for existing pb command

weechat-localhost
Ben Harris 2018-08-13 20:18:49 -04:00
parent 0ce6ea3b23
commit a59c4b3955
1 changed files with 7 additions and 3 deletions

View File

@ -1,8 +1,12 @@
function pb function pb
if type -q pb > /dev/null
command pb $argv
else
if count $argv > /dev/null if count $argv > /dev/null
curl -F'file=@'$argv[1] https://0x0.tilde.team curl -F'file=@'$argv[1] https://0x0.tilde.team
else else
curl -F'file=@-;filename=stdin.txt' https://0x0.tilde.team curl -F'file=@-;filename=stdin.txt' https://0x0.tilde.team
end end
end
end end