-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Right now, if SHELL is not exported, and dircolors was not given a shell option, it refuses to output anything: dircolors: no SHELL environment variable, and no shell type option given
Would it make more sense if dircolors tried to do a bit more sleuthing before giving up, such as trying getpwuid(getuid())->pw_shell, or examining files in /proc to reverse-engineer if the parent process of dircolors is a shell on systems that support procfs? Or is this too likely to be fraught with portability problems and potential wrong choices? One reason I ask is that by default, bash ensures that SHELL exists (either inherited from the environment, or populated as a shell variable), but does not put SHELL into the environment when populating the shell variable. So it can be rather confusing that 'echo $SHELL' prints something (the shell variable), but dircolors fails without -b because SHELL was not exported to the environment. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDIDdV84KuGfSFAYARAsSsAJwJrzNLQ1XS02VFf0EcgH/nbd46UwCePMx4 VMg67tllleK+gBE0nzIJ1Tc= =/X7h -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils