Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a Fish script tell what directory it's stored in?

Tags:

fish

So, I really like Fish - but I need some help with scripting. and in particular finding the path of the script being run.

Here is the solution for BASH Getting the source directory of a Bash script from within

Can anyone help me find the equivalent with fish?

like image 358
Olivier Refalo Avatar asked Oct 30 '13 02:10

Olivier Refalo


1 Answers

status --current-filename will output the path to the currently executing script.

For more information on the status command, you can run man status or see the documentation at http://fishshell.com/docs/current/commands.html#status

like image 79
ridiculous_fish Avatar answered Sep 26 '22 03:09

ridiculous_fish