<p dir="ltr"><br>
On May 10, 2014 9:10 AM, "Brandon Allbery" <<a href="mailto:allbery.b@gmail.com">allbery.b@gmail.com</a>> wrote:<br>
><br>
> On Sat, May 10, 2014 at 11:37 AM, Alexander Solla <<a href="mailto:alex.solla@gmail.com">alex.solla@gmail.com</a>> wrote:<br>
>><br>
>> But now consider:<br>
>><br>
>>     $ cabal --version<br>
>><br>
>>     cabal-install version 1.16.0.2<br>
>><br>
>>     using version 1.16.0 of the Cabal library<br>
>><br>
>>     $ which cabal<br>
>><br>
>>     /home/ajs/.cabal/bin/cabal<br>
>><br>
>>     $ /home/ajs/.cabal/bin/cabal --version<br>
>><br>
>>     cabal-install version 1.20.0.1<br>
>><br>
>>     using version 1.20.0.0 of the Cabal library<br>
><br>
> This is why I keep, completely pointlessly, telling people to never ever use `which`. It lies. But people want the lies and get confused when they prove to be lies.<br>
><br>
> Try `type cabal` --- NOT `which cabal` --- to see what is really going on. Then use `hash -r` to fix it.</p>
<p dir="ltr">Off-topic, but I just read a recounting of a guy recovering a system from a fork bomb, so he could only use shell builtins. And of course some sysadmin had aliased type to which, hanging the shell.</p>
<p dir="ltr">So follow Brandon's advice, and don't alias type.<br>
</p>