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.
oh-my-fish/plugins/sprunge/sprunge.fish

26 lines
781 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
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
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