From 36bdfe08e8134f8cf872f8b365fdb473dc29d8ba Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Mon, 28 Nov 2011 22:21:34 +0100 Subject: [PATCH] zshrc: Move urldecode to its own file Signed-off-by: Frank Terbeck --- etc/zsh/zshrc | 8 -------- usr_share_grml/zsh/functions/urldecode | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 usr_share_grml/zsh/functions/urldecode diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 024dbd0..6b30222 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -3398,14 +3398,6 @@ allulimit() { ulimit -t unlimited } -#f5# RFC 2396 URL encoding in Z-Shell -urlencode() { - emulate -L zsh - setopt extendedglob - input=( ${(s::)1} ) - print ${(j::)input/(#b)([^A-Za-z0-9_.!~*\'\(\)-])/%${(l:2::0:)$(([##16]#match))}} -} - # highlight important stuff in diff output, usage example: hg diff | hidiff #m# a2 hidiff \kbd{histring} oneliner for diffs check_com -c histring && \ diff --git a/usr_share_grml/zsh/functions/urldecode b/usr_share_grml/zsh/functions/urldecode new file mode 100644 index 0000000..8bae53a --- /dev/null +++ b/usr_share_grml/zsh/functions/urldecode @@ -0,0 +1,6 @@ +#f5# RFC 2396 URL encoding in Z-Shell +emulate -L zsh + +setopt extendedglob +input=( ${(s::)1} ) +print ${(j::)input/(#b)([^A-Za-z0-9_.!~*\'\(\)-])/%${(l:2::0:)$(([##16]#match))}} -- 2.1.4