X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: zzapper Subject: gurl (call browser and it an URL) Date: Thu, 16 Feb 2006 18:11:56 +0000 (UTC) Lines: 34 Message-ID: User-Agent: Xnews/5.04.25 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi > gurl www.cygwin.com or just gurl if url already in paste buffer > gurl function gurl() { # Go to URL # description : Open URL in browser if no parameter use paste buffer if [ $# -gt 0 ] then url=$1 else url=$(getclip) fi if [[ "$url" = www* ]] then # add http:// prefix if required url="http://${url}" fi # c:/progra~1/opera75/opera.exe $url c:/Program\ Files/internet\ explorer/iexplore $url & } # I sent this before but didn't ever see it arrive? -- zzapper Success for Techies http://SuccessTheory.com/ vim, zsh & success tips -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/