dotfiles/.config/fish/functions/urldecode.fish
2023-11-13 21:17:35 +01:00

10 lines
254 B
Fish

function urldecode
if test -z $argv
while read i
echo -e (echo $i | sed "s/%/\\\\x/g")
end
#python -c "import sys, urllib as ul; [sys.stdout.write(ul.quote_plus(l)) for l in sys.stdin]"
else
echo -e (echo $argv | sed "s/%/\\\\x/g")
end
end