in fact there are two confusing things, though I figured them out eventually, that perhaps fish could be more helpful about
1. when '.' is not *first in CDPATH*, 'cd ..' doesn't work as expected -- it cd's from whatever the first thing in CDPATH is. And CDPATH seems to be treated as a universal variable even though I didn't tell fish to do this, so, even though I commented out setting CDPATH in .config/fish/config.fish, and opened a new terminal window, 'cd' still behaved very oddly. Eventually I remembered universal variables and checked 'echo $CDPATH' (why??), 'type CDPATH'(didn't work), `set -U` and look through the list for CDPATH, and I found it, so then I did `set CDPATH .` and it was fixed. 2. So, I guess changes in current directory performed by the config-file don't affect the resultant shell. I was doubly surprised since fish documentation is quite clear about NOT having subshells, and in fact normal sourcing in fish -- `. testscript` where testscript consists of `cd /usr` -- does change the current directory, as expected from other shells as well as fish doc. Furthermore, fish did not report any warning/error message about 'cd' in the config-file, it just failed to change the resultant shell's current directory, making me wonder if I had got the right name of the config-file (since it didn't exist already). Luckily I was wily enough to put an `echo` in the config-file to test that it was being loaded; in fact putting cd /usr echo $PWD makes it quite clear that cd is locally effective in the config-file. (although `set -l` in the config-file only outputs argv -- it's not exactly local. `set -g` there shows `PWD /Users/me/HOME/.config/fish` among others, which is telling... ) However, putting `set -g MYVARIABLE foof` in the config-file allows me to `echo $MYVARIABLE` in the resultant interactive shell and get `foof`! Now, diabolically trying `set -g PWD /usr` in config-file actually gives an error message: set: Tried to change the read-only variable “PWD” But that was to be expected? Hmm, actually, doing `PWD=/usr` in interactive bash, changes the current directory to /usr (a behavior I I'm quite happy not to see in fish, I think). btw. I love the prompt string that abbreviates previous directories to one character. It fits very well with my obsession with making fast tab-completion to navigate my home directories. Isaac ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
