Re: Can a Bash function be named "w3m" ?
On Thu, 30 Jan 2025, Loris Bennett wrote:
> Roger Price <debian@rogerprice.org> writes:
> > [[ $(type -t w3m) == "w3m" ]] && unalias w3m
>
> Shouldn't that be
>
> [[ $(type -t w3m) == "alias" ]] && unalias w3m
You are right! From the Bash man page:
type [-aftpP] name [name ...]
With no options, indicate how each name would be interpreted
if used as a command name. If the -t option is used, type
prints a string which is one of alias, keyword, function, builtin,
or file if name is an alias, shell reserved word, function,
builtin, or disk file, respectively.
I made the change and function w3m now works correctly. Thanks.
Roger
Reply to: