|
|
Log in / Subscribe / Register

Debian's which hunt

Debian's which hunt

Posted Oct 29, 2021 11:45 UTC (Fri) by mina86 (guest, #68442)
In reply to: Debian's which hunt by dancol
Parent article: Debian's which hunt

> just change POSIX to reflect the reality we already inhabit and standardize the behavior of which(1).

That’s easier said than done. First of all, changing the standard is non-trivial in general but here we have another complication of multiple different and incompatible implementations of ‘which’.


to post comments

Debian's which hunt

Posted Nov 1, 2021 15:42 UTC (Mon) by NYKevin (subscriber, #129325) [Link]

Eh... you could take the echo(1) approach and basically say "If it's on your PATH and not an alias, shell function, etc., and you don't pass any flags, then output looks like it did in csh, otherwise the behavior is undefined."

(Yes, there are implementations which will print something funny if it's an alias, shell function, etc. See for example the builtin which in zsh.)


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds