[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Escaping URLs on the command line?
From: |
Thomas Dickey |
Subject: |
Re: lynx-dev Escaping URLs on the command line? |
Date: |
Wed, 24 Apr 2002 07:53:07 -0400 (EDT) |
>
> For the program I'm writing (to make Lynx the default browser in OS
> X), I need to escape URLs when I pass them to Lynx on the command
> line.
>
> I need to know how much escaping is necessary -- too much might make
> an escape character look like a literal to Lynx, and too little will
> fail in the shell.
> And "the shell" may be a problem too; do different shells (bash,
> tcsh, ksh) use different sets of "interpretable" characters? Is it
> possible to have an escaping routine that will work with any shell?
> What list of characters should I escape, and is backslash-escaping
> sufficient (a singlequote may appear in a URL, according to RFC 2396)?
>
> Has anyone worked this out already?
lynx does this internally (to invoke external programs). most cases can
be handled by using single quotes around the whole string, and a backslash
before a single quote, e.g.,
'this isn\'t a sentence'
--
Thomas E. Dickey <address@hidden> <address@hidden>
http://dickey.his.com
ftp://dickey.his.com
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden