From 73a6cb726324d0be16df7a2b070d9a4bb3127ef1 Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Tue, 29 Nov 2011 14:08:57 +0100 Subject: [PATCH] zshrc: Move uopen to skel/.zshrc Signed-off-by: Frank Terbeck --- doc/grmlzshrc.t2t | 4 ---- etc/skel/.zshrc | 17 +++++++++++++++++ etc/zsh/zshrc | 15 --------------- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/doc/grmlzshrc.t2t b/doc/grmlzshrc.t2t index a964a2d..756246d 100644 --- a/doc/grmlzshrc.t2t +++ b/doc/grmlzshrc.t2t @@ -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. diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index df9f4d9..17bae72 100644 --- a/etc/skel/.zshrc +++ b/etc/skel/.zshrc @@ -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 diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 0d8b290..204dbcc 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -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() { -- 2.1.4