From 54af9aa606acad109e2f1833be24c4789667740e Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Mon, 5 May 2008 14:46:51 +0100 Subject: [PATCH] url encoding with zsh --- .zsh/func/urlencode | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .zsh/func/urlencode diff --git a/.zsh/func/urlencode b/.zsh/func/urlencode new file mode 100644 index 0000000..21e8ab7 --- /dev/null +++ b/.zsh/func/urlencode @@ -0,0 +1,4 @@ +# http://www.michael-prokop.at/computer/config/.zshrc +setopt localoptions extendedglob +input=( ${(s::)1} ) +print ${(j::)input/(#b)([^A-Za-z0-9_.!~*\'\(\)-])/%$(([##16]#match))} -- 2.39.5