Hi all,

I’ve been a zsh shell user for a while and after I’ve discovered fish shell, I 
became interested in it and decided to slowly migrate to it. I currently have a 
couple of expressions and settings in .zshenv and .zshrc that I’d like to port 
to the fish configuration.

My question is the following:

Does fish have a mechanism to tell if a directory exists? This could be extra 
useful to set environment variables based on that condition. The POSIX 
equivalent looks like this:

if [[ -d "${HOME}/.bin" ]]; then
  export PATH=~/bin:${PATH}
fi

I’d like to see how to use the same (and similar) functions in fish shell, such 
as...

* Testing if a directory exists (-d)
* Testing if a file exists (-a)
* Testing if a file is executable (-x) 

Thanks in advance,

— Attila
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to