Open unixfile opened 8 years ago
@00001 Will check and fix. Thanks for letting me know!
As for why not merging this with the bash repo, this project actually started as a pull request to do exactly that, see kennethreitz/autoenv#59 for more info.
BTW, if you use fish as your only shell, you don't need to install the standard autoenv, this one will do. If you use several shells (or several users, each with their own shell) and I can do anything to make installation easier, just let me know.
It looks like the "shadow-builtin" is still very much in the air and, as far as I can tell, has been removed from the code base.
Will keep an eye on fish-shell/fish-shell#3000 and implement if the builtin protection comes back again.
Amazingly fast response I have to say!
As for my setup, I use fish 90 % of the time, but fall back on bash sometimes for compatibility reasons.
I investigated this project as an alternative to direnv, to manage environment variables in one place, but realized that it is not possible because fish assigns them in an idiosyncratic way.
Direnv works, but generates too much noise.
Anyway, thanks for this otherwise very useful project.
I found a bug causing 2 symptoms:
cd
doesn't change to the home-folder anymore and instead returns:
cd: Unknown error trying to locate directory “”
cd -
instead of switsching back to last directory it returns:
cd: Unknown error trying to locate directory “”
here are my dotfiles, so you can see how I included activate.fish: https://github.com/CrusaderW/dotfiles
I'm happy to fork and dig into the problem myself, but as I'm quite new to fish-scripting I need some insight, where the unintended behaviour originates.
And great work with the script. I love it and use it though it causes minor inconvenience.
@CrusaderW thanks for letting me know!
I'll have a look and probably push a fix tomorrow. I must admit that I wasn't aware of the cd -
behaviour, never used it myself.
And thanks! I'm glad you find it useful (now let's see if I can remove the inconveniences).
@CrusaderW Fish ships with a wrapper function around the builtin cd
that understands cd -
as changing to the previous directory. When you normally type cd
, you're calling the function cd.fish
that provides the bells and whistles. But the autoenv script uses builtin cd
.
Hi, Any news about this issue? I recently discover autoenv and I am using fish - but this issue with 'cd' command cause some noise in day use. I am try fix it, no success yet, if you know something...thank you.
Using fish version 2.3.1-424-g0a51b17, I get the following error
Can be fixed by adding --shadow-builtin to line 126 in activate.fish
Btw, why not merge this repo with the bash repo. Would take away one installation step.