I think the unfortunate answer is that there is no way - there's no equivalent 
to BASH_SOURCE. Please open an issue on the github page. Thanks

_fish

On Apr 12, 2013, at 12:22 PM, Hans Stimer <hans.sti...@gmail.com> wrote:

> How does a script figure out where it is being run from?
> 
> In Bash you can use this bit of ugliness:
> 
> # Find where we are installed; not linked to
> SOURCE="${BASH_SOURCE[0]}"
> while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a 
> symlink
>   DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
>   SOURCE="$(readlink "$SOURCE")"
>   [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative 
> symlink, we need to resolve it relative to the path where the symlink file 
> was located
> done
> DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
> export DOTDIR=$DIR
> 
> Is there a way to do this in fish? Hopefully in a more straight forward way.
> ------------------------------------------------------------------------------
> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
> Get 100% visibility into your production application - at no cost.
> Code-level diagnostics for performance bottlenecks with <2% overhead
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap1_______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to