> $ touch - && echo ok
> ok
Not a bug - you successfully touched stdout (in this case,
your terminal). Remember, many commands special case - to
mean stdin or stdout if they operate well on a single file.
>
> $ ls -
> ls: cannot access -: No such file or directory
ls is not one of those commands. So rather than listing
stdin or stdout (neither of which makes sense), it tries
to list ./- and fails.
If you really must touch ./-, then say so:
touch ./-
--
Eric Blake