[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] more cleanup before adding shell functions
From: |
Paul Eggert |
Subject: |
Re: [PATCH] more cleanup before adding shell functions |
Date: |
Thu, 09 Oct 2008 12:22:30 -0700 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
Eric Blake <address@hidden> writes:
> Since AS_BASENAME is undocumented, and since it is most useful in variable
> assignments, perhaps it is time to redefine it as follows (untested)
>
> # AS_BASENAME(var, name, [ext])
> # -----------------------------
> # Compute the basename of NAME, with trailing EXT removed, and assign
> # the result to the shell variable VAR.
I like this idea. It's been on my mental to-do list for quite some
time, and it's an obvious improvement. We can't simply use "${1##*/}",
though, as that mishandles the basenames of strings like "a/b/" and "///".
- Re: [PATCH] more cleanup before adding shell functions, (continued)
Re: [PATCH] more cleanup before adding shell functions,
Paul Eggert <=
- Reimplementing AS_BASENAME [was: [PATCH] more cleanup before adding shell functions], Eric Blake, 2008/10/09
- Re: [PATCH] more cleanup before adding shell functions, Paolo Bonzini, 2008/10/09
- Reimplementing AS_BASENAME, Eric Blake, 2008/10/09
- Re: Reimplementing AS_BASENAME, Ralf Wildenhues, 2008/10/10
- Re: Reimplementing AS_BASENAME, Paolo Bonzini, 2008/10/10