diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2006-02-19 21:20:43 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2006-02-19 21:20:43 +0000 |
commit | e66dce41bccc73867efde01958d8d51f11041706 (patch) | |
tree | 0364f1910d093c883c81a8f0cf18b791bb5f2ee9 /Functions/MIME | |
parent | a9151388528c84d7993a366ae03b57f5a413ca78 (diff) | |
download | zsh-e66dce41bccc73867efde01958d8d51f11041706.tar.gz zsh-e66dce41bccc73867efde01958d8d51f11041706.tar.xz zsh-e66dce41bccc73867efde01958d8d51f11041706.zip |
22285: assorted fixes:
_imagemagick files intro.yo list of other manual pages pick-web-browser: add firefox zsh-mime-setup: list consistent with styles for zsh-mime-handler
Diffstat (limited to 'Functions/MIME')
-rw-r--r-- | Functions/MIME/pick-web-browser | 5 | ||||
-rw-r--r-- | Functions/MIME/zsh-mime-setup | 16 |
2 files changed, 16 insertions, 5 deletions
diff --git a/Functions/MIME/pick-web-browser b/Functions/MIME/pick-web-browser index 1a73b4de7..665b0db54 100644 --- a/Functions/MIME/pick-web-browser +++ b/Functions/MIME/pick-web-browser @@ -28,7 +28,7 @@ local -a xbrowsers ttybrowsers # a remote URL. You can change the order of preference. # If none is already running, starts the first in the array. zstyle -a :mime: x-browsers xbrowsers || - xbrowsers=(mozilla netscape opera konqueror) + xbrowsers=(firefox mozilla netscape opera konqueror) # Preferred command line browser. Used if there is on $DISPLAY set. zstyle -a :mime: tty-browsers ttybrowsers || ttybrowsers=(links lynx) @@ -89,6 +89,9 @@ if [[ -n $DISPLAY ]]; then # MIME handling, not just web pages. kfmclient openURL $url || dcop $(dcop|grep konqueror) default openBrowserWindow $url + elif [[ $browser = firefox ]]; then + # open in new tab: should make this customizable + $browser -new-tab $url else # Mozilla bells and whistles are described at: # http://www.mozilla.org/unix/remote.html diff --git a/Functions/MIME/zsh-mime-setup b/Functions/MIME/zsh-mime-setup index 150d4c07f..9a3e69610 100644 --- a/Functions/MIME/zsh-mime-setup +++ b/Functions/MIME/zsh-mime-setup @@ -32,11 +32,19 @@ done if [[ -n $o_list ]]; then - # List and return. + # List and return. Remember that suffixes may be overridden by styles. + # However, we require some sort of standard handler to be present, + # so we don't need to search styles for suffixes that aren't + # handled. Yet. + local list_word for suffix in ${(ko)zsh_mime_handlers}; do - print ${(r.10.)suffix}${zsh_mime_handlers[$suffix]} - if [[ -n ${zsh_mime_flags[$suffix]} ]]; then - print " flags: ${zsh_mime_flags[$suffix]}" + zstyle -s ":mime:.$suffix:" handler list_word || + list_word=${zsh_mime_handlers[$suffix]} + print ${(r.10.)suffix}$list_word + zstyle -s ":mime:.$suffix:" flags list_word || + list_word=${zsh_mime_flags[$suffix]} + if [[ -n $list_word ]]; then + print " flags: $list_word" fi done return 0 |