enhance bts with lp:1234567
authorThorsten Glaser <tg@mirbsd.org>
Sat, 11 Jan 2014 20:36:11 +0000 (20:36 +0000)
committerThorsten Glaser <tg@mirbsd.org>
Sat, 11 Jan 2014 20:36:11 +0000 (20:36 +0000)
bash-ksh/profile-funcs

index 084a870..9325531 100644 (file)
@@ -2,6 +2,8 @@
 bts() {
        if [[ $1 = +([0-9]) ]]; then
                ${BROWSER:-lynx} "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=$1"
+       elif [[ $1 = lp:+([0-9]) ]]; then
+               ${BROWSER:-lynx} "https://bugs.launchpad.net/bugs/${1#lp:}"
        else
                ${BROWSER:-lynx} "http://bugs.debian.org/$*"
        fi