4 ms·
Especially on something like NixOS, where /bin/bash is actually /nix/store/3508wrguwrgu3h5y9354rhfgw056y-bash-5.0/bin/bash.
by majewsky 8y ago
Especially on something like NixOS, where /bin/bash is actually /nix/store/3508wrguwrgu3h5y9354rhfgw056y-bash-5.0/bin/bash.
- tjoff 8y agoIf you run --help you already have the path to the executable. Press the up arrow and you got it, even on nix.
- LukeShu 8y agoDo note that was my complaint with $0, that when using $PATH it was set to that full gross path. If /bin/foo is actually /nix/store/3508wrguwrgu3h5y9354rhfgw056y-foo-5.0/bin/foo, then when you run "foo", 0="/nix/store/3508wrguwrgu3h5y9354rhfgw056y-foo-5.0/bin/foo" and BASH_ARGV0="foo".