Re: Do test-path_is_{file,dir,exists} make sense anymore with -x?
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 26, 2019, 19:58 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1902262055260.41@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20190226173542.GC19606@sigill.intra.peff.net>
Hi,
On Tue, 26 Feb 2019, Jeff King wrote:
> I had a vague notion that there was some reason (portability?) that we > preferred to have the wrappers. But as your patch shows, they really are > just calling "test" and nothing else.
Let's also not forget about the fact that `test -f` is actually not all that intuitive an interface. Whereas even somebody without training in software development (let alone Unix shell scripting) understands the meaning of
test_path_is_file this-file.txt
And even for a trained eye, the trace of `test -f` is sometimes hard to read, as you do *not* see the exit code in the trace, so you have to guess from circumstantial evidence whether it failed or succeeded.
Ciao, Dscho