I previously worked at a company who heavily used KDB (q) in their workflow. That's why I used this official article to install it. Using 5th step (Step 5: Edit your profile), I added this alias alias q='QHOME=~/q rlwrap -r ~/q/m64/q'
to my .zshrc
file, and source
d it.
After a while, I decided to remove kdb from my system, so I deleted all the necessary files and removed the line alias q='QHOME=~/q rlwrap -r ~/q/m64/q'
from my .zshrc
, and again I used source
to activate this change.
But for some reason, the alias q
is still appearing to exist, even after that (sytax highlighting of my terminal also proves that). Now, hovewer, after executing q
, I'm getting the error because I removed the necessary files for it to run properly:
❯ q
rlwrap: error: Cannot execute /Users/*****/q/m64/q: No such file or directory
Can somebody please explain what's going on? How do I completely and permanently get rid of this alias?
unalias q
. Explanation here (forbash
, but in this case it also applies tozsh
): stackoverflow.com/questions/66483407/…source
does not "activate changes", it runs the commands in a file. There used to be a command in your .zshrc to createq
as an alias, so when yousource
d the file it created that alias. The file no longer contains that command, sosource
ing it doesn't create that alias anymore... but it doesn't delete it either, so the alias is still set in your shell. Eitherunalias
it or just create a new shell that doesn't have the alias.unalias q
, stopped all terminals, reloaded my computer, - nothing helped. It is still there =(type q
, make sure thatq
is indeed an alias. If it's still showing up in a new shell, then it is being set in one of the startup files.type q
: q is an alias for QHOME=~/q rlwrap -r ~/q/m64/q It seems that it is indeed a valid alias. But there is no a single string that could cause that in the startup files that you provided. Anyways, thank you