oh-my-fish/plugins/sprunge/sprunge.fish

26 lines
781 B
Fish
Raw Normal View History

2014-03-24 20:51:17 +00:00
# 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
echo -e 'This plugin is obsolete.\nConsider using dpaste, it is tested, has more features, and supports different sites, including sprunge.\nFor more information, enable dpaste plugin and execute it:\n$ dpaste\n' >&2
if isatty
2014-03-24 21:02:12 +00:00
if [ (count $argv) -gt 0 ]
if [ -f $argv ]
cat $argv
else
echo $argv
end | curl -F 'sprunge=<-' http://sprunge.us
else
echo -e "Usage:
2014-03-24 20:51:17 +00:00
* sprunge < README.md
* sprunge README.md
* cat README.md | sprunge
* sprunge "I \<3 paulloz""
end
2014-03-24 21:02:12 +00:00
else
curl -F 'sprunge=<-' http://sprunge.us
end
2014-03-24 20:51:17 +00:00
end