Signed-off-by: Frank Terbeck <ft@bewatermyfriend.org>
smaller set of changes. Descends recursively into subdirectories. Ignores
hows some information about current status.
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.
: **uprint()**
Works around the "print -l ${(u)foo}"-limitation on zsh older than 4.2.
+## 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
## log out? set timeout in seconds...
## ...and do not log out in some specific terminals:
#if [[ "${TERM}" == ([Exa]term*|rxvt|dtterm|screen*) ]] ; then
vim --cmd 'let no_plugin_maps = 1' -c "so \$VIMRUNTIME/macros/less.vim" "${@:--}"
}
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() {
# Function Usage: doc packagename
#f5# \kbd{cd} to /usr/share/doc/\textit{package}
doc() {