Thread (20 messages) flat view 20 messages, 6 authors, 2021-06-24

Re: [PATCH 1/4] test-lib-functions: introduce test_line_count_cmd

From: Felipe Contreras <hidden>
Date: 2021-06-13 21:42:59

Phillip Wood wrote:
On 13/06/2021 14:28, Ævar Arnfjörð Bjarmason wrote:
quoted
On Sat, Jun 12 2021, Đoàn Trần Công Danh wrote:
quoted
+	   { test "x$1" = "x!" && test $# = 1 ; }
[...]
+	if test "x$1" = "x!"
We don't use this test idiom in other places, it's OK to just use "$1" =
"!". I think we're past whatever portability concern made that popular
in some older shell code in the wild.
Slightly off topic but if anyone is interested in the history of this 
test idiom and why it is no longer needed there is a good article at 
https://www.vidarholen.net/contents/blog/?p=1035
Very nice! I often wondered why people did that.

-- 
Felipe Contreras
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help