autoconf-patches
[Top][All Lists]
Advanced

[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 "///".




reply via email to

[Prev in Thread] Current Thread [Next in Thread]