1

I'm running Artix Linux and using zsh, and these two aliases return no matter how many times I unalias them or remove them from my aliasrc:

run-help=man
which-command=whence

And they don't exist in any of the places I've learned aliases can be stored, including:

/etc/profile
/etc/zsh/zprofile                       (which simply sources /etc/profile)
/etc/bash/bashrc
/etc/bash/bashrc.d/artix.bashrc
/home/$USER/.zshrc
/home/$USER/.zprofile -> /home/$USER/.config/shell/profile
/home/$USER/.config/shell/aliasrc       (where I store my aliases)

~$ zsh -ixc : 2>&1 | grep which-command returns nothing.

~$ zsh -ixc : 2>&1 | grep run-help returns a (long) line from /usr/share/zsh/functions/Completion/compaudit.

..._rubber ruby _ruby ruby-mri _ruby run-help _run-help rup _hosts rusage _precommand...

zsh -o SOURCE_TRACE returns:

+/home/$USER/.zshrc:1> <sourcetrace>
+/home/$USER/.config/shell/aliasrc:1> <sourcetrace>
+/home/$USER/.zcompdump:1> <sourcetrace>

.zcompdump contains a lot of text, and it does include run-help and which, but not which-command, which-command=whence, or run-help=man.

It seems like zsh completions could be the source of this problem, but I don't know what part of its configuration does this.

Where are these aliases coming from, and how can I permanently remove them?

1 Answer 1

2

Those aliases are part of the zsh distribution, and are set in a C language function in the compiled source code.

The aliases are used by zle, the editor used for command lines in zsh. In both cases, the aliases are default implementations that can be overridden with functions with more capabilities; example functions are also included in the zsh distribution. The documentation for accessing online help describes how this works for run-help, and the documentation for which-command is also in the user contributions section of the manual.

To remove them, add the unalias commands to one of the zsh startup files, e.g. ~/.zshrc:

unalias run-help
unalias which-command

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .