views:

29

answers:

1

I'm trying to get SBT running using the Fish shell. Below is the equivalent Bash script of what I'm trying to achieve:

java -Xmx512M -jar `dirname $0`/sbt-launch.jar "$@"

I see in the Fish documentation that $@ in Bash can be replaced with $argv in Fish. But I cannot see what to replace dirname $0 with.

Does anyone know the equivalent script in Fish?

A: 

The fish equivalent to this:

java -Xmx512M -jar $(dirname $0)/sbt-launch.jar "$@"     # Bash, et al

is

java -Xmx512M -jar (dirname $_)/sbt-launch.jar "$argv"      # fish
Dennis Williamson
Hey Dennis thanks for the reply. I've got a strange issue though, $_ is always an empty string for me. Any ideas?
Brian Heylin