sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 148e6e3b7979fce87fc85c88816110b704dc1841
parent 84b08427a167f5729f7cd439a4eb260ece98e7b5
Author: Evan Gates <evan.gates@gmail.com>
Date:   Tue Nov 18 13:41:52 -0800

read stdin if arg is exactly "-" not just begins with '-'

Diffstat:
cat.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cat.c b/cat.c @@ -30,7 +30,7 @@ main(int argc, char *argv[]) concat(stdin, "<stdin>", stdout, "<stdout>"); } else { for (; argc; argc--, argv++) { - if (argv[0][0] == '-') + if (argv[0][0] == '-' && !argv[0][1]) argv[0] = "/dev/fd/0"; if (!(fp = fopen(argv[0], "r"))) { weprintf("fopen %s:", argv[0]);