From f256f971c9ed872f114670ac72a0a8da868521a6 Mon Sep 17 00:00:00 2001 From: Herst Date: Wed, 10 May 2017 10:50:02 +0200 Subject: [PATCH] Added note that -- might end option but not necessarily the special handling of "-", David A. Wheeler also mentions this in his essay --- SC2035.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SC2035.md b/SC2035.md index 40c7c57..2708d4f 100644 --- a/SC2035.md +++ b/SC2035.md @@ -19,6 +19,6 @@ A file named `-f` (`touch -- -f`) will not be deleted by the problematic code. I Using `./*` will instead cause the glob to be expanded into `./-f`, which no program will treat as an option. -Similarly, `--` by convention indicates the end of options, and nothing after it will be treated like flags. +Similarly, `--` by convention indicates the end of options, and nothing after it will be treated like flags (except for some programs possibly still special casing `-` as e.g. stdin). For more information, see "[Filenames and Pathnames in Shell: How to do it Correctly](http://www.dwheeler.com/essays/filenames-in-shell.html)".