A convention for -file

std-unix at ut-sally.UUCP std-unix at ut-sally.UUCP
Mon Oct 27 14:26:31 AEST 1986


From: weemba at brahms.berkeley.edu (Matthew P Wiener)
Date: Fri, 24 Oct 86 14:27:50 PDT
Organization: University of California, Berkeley

In article <6029 at ut-sally.UUCP> Mark Horton writes:
>	Since many commands take names beginning with "-" as flags,
>		file names beginning with "-" don't always work.

There's a real easy fix to the current random collection of special
flags that handle filenames beginning with a dash: always interpret
two dashes at the beginning of a command line argument as the name for
the file obtained by eliding the two dashes into one.  Thus

% rm --xyz ----xyz

would mean remove -xyz ---xyz, etc.  It's completely unambiguous,
until some clown comes up with flags needing two dashes.  Similarly
for ++file with commands using + flags.

ucbvax!brahms!weemba	Matthew P Wiener/UCB Math Dept/Berkeley CA 94720

Volume-Number: Volume 7, Number 91



More information about the Mod.std.unix mailing list