'Get current script location in Nu shell
In bash you can use $0 variable to get the location of the current script. How I do the same in Nu? echo $nu doesn't seem to have anything I can use.
Solution 1:[1]
I don't think there's a way to do this yet. I was playing with history | last but it's one off, as you'd expect.
Solution 2:[2]
($nu.config-path | path dirname )
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Darren |
| Solution 2 | jiahut |
