On Mon, 19 Feb 2018 15:11:45 -0500,
Eli Schwartz via arch-projects wrote:
> +# Check if a file exists, even if the file uses wildcards
> +is_globfile() {
> +     [[ -f $1 ]]
> +}
> +

Dave's comment on my version of this patchset applies equally to this
version:

> Frankly, this function name and comment sucks, because it says nothing
> about quoting. As I read the comment, I'm lead to believe that given a
> file "foobar" existing, I can call: __isGlobfile "foo*", and this will
> succeed. To the naive reader, you might even believe this claim based on
> the unquotedness of $1 within the -f test.

(I had the same function, with the same comment, as is_globfile in
db-functions and as __isGlobfile in common.bash)

-- 
Happy hacking,
~ Luke Shumaker

Reply via email to