zshrc: Move uopen to skel/.zshrc
authorFrank Terbeck <ft@bewatermyfriend.org>
Tue, 29 Nov 2011 13:08:57 +0000 (14:08 +0100)
committerMichael Prokop <mika@grml.org>
Tue, 6 Dec 2011 13:50:46 +0000 (14:50 +0100)
Signed-off-by: Frank Terbeck <ft@bewatermyfriend.org>
doc/grmlzshrc.t2t
etc/skel/.zshrc
etc/zsh/zshrc

index a964a2d..756246d 100644 (file)
@@ -791,10 +791,6 @@ Makes a unified diff of the command line arguments trying hard to find a
 smaller set of changes. Descends recursively into subdirectories. Ignores
 hows some information about current status.
 
-: **uopen()**
-Downloads and displays a file using a suitable program for its
-Content-Type.
-
 : **uprint()**
 Works around the "print -l ${(u)foo}"-limitation on zsh older than 4.2.
 
index df9f4d9..17bae72 100644 (file)
@@ -228,6 +228,23 @@ fi
 #    fi
 #}
 
+## Download a file and display it locally
+#uopen() {
+#    emulate -L zsh
+#    if ! [[ -n "$1" ]] ; then
+#        print "Usage: uopen \$URL/\$file">&2
+#        return 1
+#    else
+#        FILE=$1
+#        MIME=$(curl --head $FILE | \
+#               grep Content-Type | \
+#               cut -d ' ' -f 2 | \
+#               cut -d\; -f 1)
+#        MIME=${MIME%$'\r'}
+#        curl $FILE | see ${MIME}:-
+#    fi
+#}
+
 ## log out? set timeout in seconds...
 ## ...and do not log out in some specific terminals:
 #if [[ "${TERM}" == ([Exa]term*|rxvt|dtterm|screen*) ]] ; then
index 0d8b290..204dbcc 100644 (file)
@@ -2790,21 +2790,6 @@ viless() {
     vim --cmd 'let no_plugin_maps = 1' -c "so \$VIMRUNTIME/macros/less.vim" "${@:--}"
 }
 
-# Function Usage: uopen $URL/$file
-#f5# Download a file and display it locally
-uopen() {
-    emulate -L zsh
-    if ! [[ -n "$1" ]] ; then
-        print "Usage: uopen \$URL/\$file">&2
-        return 1
-    else
-        FILE=$1
-        MIME=$(curl --head $FILE | grep Content-Type | cut -d ' ' -f 2 | cut -d\; -f 1)
-        MIME=${MIME%$'\r'}
-        curl $FILE | see ${MIME}:-
-    fi
-}
-
 # Function Usage: doc packagename
 #f5# \kbd{cd} to /usr/share/doc/\textit{package}
 doc() {