dot

packages and services management
Log | Files | Refs | README

commit d9ab6afa0f66e3c9d65e5471ea598d96aa8270e6
parent 5e8616f12b77d02e0517ca948eb30211b6e9779e
Author: Josuah Demangeon <mail@josuah.net>
Date:   Tue,  9 May 2017 11:39:49 +0200

io-url with ports

Diffstat:
M.profile | 6+++---
Mbin/io-url | 22+++++++++++++++++-----
Murl | 2+-
3 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/.profile b/.profile @@ -59,12 +59,12 @@ export NAME EMAIL TZ # default commands -EDITOR='vis' -VISUAL='vis' +EDITOR='vi' +VISUAL='vi' PAGER='less' MANPAGER='less -R' DVTM_PAGER='less -R' -BROWSER='chromium' +BROWSER='firefox' export EDITOR VISUAL PAGER MANPAGER DVTM_PAGER BROWSER diff --git a/bin/io-url b/bin/io-url @@ -1,10 +1,14 @@ # open a link from $CONFIG/url appropritately url="$({ - printf '# ' abduco | sed 's|.*\t||; y|!|/|' | grep '://' printf '\n' + + cat "$GIT/gandi/url" + + printf '\n' cat "$ETC/url" + } | iomenu -s -p 'url')" name="$(printf %s "$url" | sed 's|/|!|g')" @@ -24,11 +28,19 @@ case "$url" in cgo "$url" ;; ( irc://* ) + url="${url#irc://}" + case "$url" in + ( *:6697 ) port="-e ${url##*:}" ;; + ( *:* ) port="-p ${url##*:}" ;; + ( * | '' ) port='' ;; + esac + url="${url%:*}" + ABDUCO="$name" exec abduco -e "$e" -A "$name" \ ii -i "${IRC:-$HOME/var/irc}" \ - -n "${NICK:-$USER}" \ - -f "$NAME" \ - -s "${url#irc://}" \ - -e 6697 + -n "${NICK:-$USER}" \ + -f "$NAME" \ + -s "$url" \ + $port ;; esac diff --git a/url b/url @@ -1,5 +1,5 @@ # irc channels -irc://irc.freenode.net +irc://irc.freenode.net:6667 irc://irc.oftc.net irc://unix.chat irc://irc.cyberia.is