X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=.zsh%2Ffunc%2Furlencode;h=ad48f221f3dcbec5fd15b94ece570d5a02b8cb8d;hb=910ef4f05663ec9859e25ccf26318128e56f4ee8;hp=21e8ab7eb10a6796d96bd14dc0d0c3ac217eb4b6;hpb=f154e24079e93462f458c686f1b32eacbf601645;p=zsh.git diff --git a/.zsh/func/urlencode b/.zsh/func/urlencode index 21e8ab7..ad48f22 100755 --- a/.zsh/func/urlencode +++ b/.zsh/func/urlencode @@ -1,4 +1,16 @@ -# http://www.michael-prokop.at/computer/config/.zshrc +#!/bin/zsh +# +# func/urlencode +# +# encode strings for use with URLs +# +# Copyright © 1994–2008 martin f. krafft +# Released under the terms of the Artistic Licence 2.0 +# +# Source repository: git://git.madduck.net/etc/zsh.git +# +# Based on http://www.michael-prokop.at/computer/config/.zshrc + setopt localoptions extendedglob input=( ${(s::)1} ) print ${(j::)input/(#b)([^A-Za-z0-9_.!~*\'\(\)-])/%$(([##16]#match))}