| JAPANESE | ENGLISH |
zsh widget and functions extened from widget introducted in Crouton's diary(japanese). You can enter URL directly in console, and browse or download it.
sugi@tempest:~% http://shlashdot.jp/ [Enter]
Type URL and Hit [Enter]...
sugi@tempest:~% _resolv_url http://shlashdot.jp/ Browse or Download this URL? [B/d] [Enter]
Prompt displayed. choice one. ([Enter] for upper case letter)
sugi@tempest:~% _resolv_url http://shlashdot.jp/ Browse or Download this URL? [B/d] sugi@tempest:~% Message: Galeon already running, using existing process
URL has been sended to galeon.
sugi@tempest:~% http://ftp.us.debian.org/debian/pool/main/b/base-files/base-files_3.0.2_i386.deb Enter]
Browse or Download this URL? [b/D] [Enter]
--09:12:55-- http://ftp.us.debian.org/debian/pool/main/b/base-files/base-files_3.0.2_i386.deb
=> `base-files_3.0.2_i386.deb'
Resolving ftp.us.debian.org... done.
Connecting to ftp.us.debian.org[35.9.37.225]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 30,956 [application/x-debian-package]
100%[====================================>] 30,956 55.17K/s ETA 00:00
09:12:56 (55.17 KB/s) - `base-files_3.0.2_i386.deb' saved [30956/30956]
if autoload +X -U _accept_line_with_url > /dev/null 2>&1; then
zle -N accept-line-with-url _accept_line_with_url
bindkey '^M' accept-line-with-url
bindkey '^J' accept-line-with-url
fi
export WWW_BROWSER="netscape-remote %s"
export DOWNLOADER="wget -nv"
following value affected.
ex: browse_or_download_method="auto"
if [ -d ~/lib/zsh/functions ]; then
fpath=(~/lib/zsh/functions $fpath)
fi
......(snip).......
if autoload +X -U _accept_line_with_url > /dev/null 2>&1; then
zle -N accept-line-with-url _accept_line_with_url
bindkey '^M' accept-line-with-url
bindkey '^J' accept-line-with-url
fi
if [[ -z "$DISPLAY" ]]; then export WWW_BROWSER="w3m" else export WWW_BROWSER="galeon -n %s &!" fi export DOWNLOADER="wget -S"