zshrc: Fixing a bug in urlencode()
[grml-etc-core.git] / etc / skel / .zshrc
index 9be1c85..d7b2840 100644 (file)
@@ -3,7 +3,6 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Mit Aug 06 23:31:19 CEST 2008 [mika]
 ################################################################################
 
 # source ~/.zshrc.global {{{
@@ -220,6 +219,9 @@ alias fblinks='links2 -driver fb'
 alias insecssh='ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"'
 alias insecscp='scp -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"'
 
+# simple webserver
+check_com -c python && alias http="python -m SimpleHTTPServer"
+
 # Use 'g' instead of 'git':
 check_com g || alias g='git'
 
@@ -817,7 +819,7 @@ ogg2mp3_192() {
 urlencode() {
     setopt localoptions extendedglob
     input=( ${(s::)1} )
-    print ${(j::)input/(#b)([^A-Za-z0-9_.!~*\'\(\)-])/%$(([##16]#match))}
+    print ${(j::)input/(#b)([^A-Za-z0-9_.!~*\'\(\)-])/%${(l:2::0:)$(([##16]#match))}}
 }
 
 #f5# Install x-lite (VoIP software)