[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] gtroff & soelim don't recognize ~ in paths
From: |
Keith Marshall |
Subject: |
Re: [Groff] gtroff & soelim don't recognize ~ in paths |
Date: |
Tue, 11 Apr 2006 00:51:07 +0100 |
On Monday 10 April 2006 11:19 pm, Werner LEMBERG wrote:
> > > I'm used to it working in vi(m) and I seem to remember it working
> > > in awk. I've also seen it work in X11-based file dialogs. Over
> > > time, I suppose I've come to assume that ~ was a Un*x idiom rather
> > > than a shell idiom.
> >
> > Agreed; why shouldn't it work in groff? It should be relatively
> > straightforward to implement it (looks the other way).
>
> Consider this:
>
> .tr ~X
> .so ~/foo/bar
And you might also consider this, in the bash *shell*:
$ dir='~'
$ ls $dir
ls: ~: No such file or directory
Yes, that's a contrived example of a situation where it doesn't even work
in the shell, but it can have practical implications: say the `dir'
variable is assigned, in an interactive script, by a `read' command; in
this case using the response directly will fail, if the user adopts the
tilde idiom. (The work around, of course, is to `eval' the subsequent
expansion of the reply):
$ eval ls $dir
file1 file2 file3 ...
Regards,
Keith.
- Re: [Groff] gtroff & soelim don't recognize ~ in paths, (continued)
- Re: [Groff] gtroff & soelim don't recognize ~ in paths, Greg 'groggy' Lehey, 2006/04/09
- Re: [Groff] gtroff & soelim don't recognize ~ in paths, Miklos Somogyi, 2006/04/10
- Re: [Groff] gtroff & soelim don't recognize ~ in paths, Werner LEMBERG, 2006/04/10
- Re: [Groff] gtroff & soelim don't recognize ~ in paths, Tadziu Hoffmann, 2006/04/11
- Re: [Groff] gtroff & soelim don't recognize ~ in paths, Larry Kollar, 2006/04/11
- Re: [Groff] gtroff & soelim don't recognize ~ in paths, Miklos Somogyi, 2006/04/11
- Re: [Groff] gtroff & soelim don't recognize ~ in paths, Tadziu Hoffmann, 2006/04/11
- Re: [Groff] gtroff & soelim don't recognize ~ in paths, Werner LEMBERG, 2006/04/11
- Re: [Groff] gtroff & soelim don't recognize ~ in paths, Larry Kollar, 2006/04/10
- Re: [Groff] gtroff & soelim don't recognize ~ in paths, Werner LEMBERG, 2006/04/10
- Re: [Groff] gtroff & soelim don't recognize ~ in paths,
Keith Marshall <=
- Re: [Groff] gtroff & soelim don't recognize ~ in paths, Greg 'groggy' Lehey, 2006/04/10
- Re: [Groff] gtroff & soelim don't recognize ~ in paths, Keith Marshall, 2006/04/11