You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
568 B
Fish
25 lines
568 B
Fish
# Just a sprunge wrapper for fish-shell
|
|
# Paul Joannon (paulloz) <paul.joannon@gmail.com>
|
|
# https://github.com/Paulloz/fish-sprunge
|
|
# Based on oh-my-zsh's sprunge plugin
|
|
|
|
function sprunge
|
|
if isatty stdin
|
|
if [ (count $argv) -gt 0 ]
|
|
if [ -f $argv ]
|
|
cat $argv
|
|
else
|
|
echo $argv
|
|
end | curl -F 'sprunge=<-' http://sprunge.us
|
|
else
|
|
echo -e "Usage:
|
|
* sprunge < README.md
|
|
* sprunge README.md
|
|
* cat README.md | sprunge
|
|
* sprunge "I \<3 paulloz""
|
|
end
|
|
else
|
|
curl -F 'sprunge=<-' http://sprunge.us
|
|
end
|
|
end
|