mirror of
https://github.com/RGBCube/crash
synced 2025-07-28 17:07:45 +00:00
Add PATH search note and OpenSSH section
This commit is contained in:
parent
99f9fff32c
commit
0b88386484
1 changed files with 30 additions and 0 deletions
30
README.md
30
README.md
|
@ -48,6 +48,12 @@ shell like so, in a NixOS module:
|
||||||
# exits with an error, fish will be launched instead. And if fish fails, the
|
# exits with an error, fish will be launched instead. And if fish fails, the
|
||||||
# fallback shell, which is pkgs.bashInteractive will get run.
|
# fallback shell, which is pkgs.bashInteractive will get run.
|
||||||
environment.sessionVariables.SHELLS = "${lib.getExe pkgs.nushell}:${lib.getExe pkgs.fish}";
|
environment.sessionVariables.SHELLS = "${lib.getExe pkgs.nushell}:${lib.getExe pkgs.fish}";
|
||||||
|
|
||||||
|
# This would also work, as Crash searches $PATH:
|
||||||
|
#
|
||||||
|
# environment.sessionVariables.SHELLS = "nu:fish";
|
||||||
|
#
|
||||||
|
# However, just setting an absolute path is pretty easy and better.
|
||||||
})
|
})
|
||||||
|
|
||||||
# Uncomment to make the fallback shell of crash pkgs.dash. Will require a recompilation!
|
# Uncomment to make the fallback shell of crash pkgs.dash. Will require a recompilation!
|
||||||
|
@ -62,6 +68,30 @@ shell like so, in a NixOS module:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Tips & Tricks
|
||||||
|
|
||||||
|
You can control the default shell / program that will get launched
|
||||||
|
by SSH using Crash. All you need to do it make OpenSSH accept the `SHELLS`
|
||||||
|
environment variable and set it when SSH'ing in. Here is a NixOS
|
||||||
|
module that does that:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings.AcceptEnv = "SHELLS";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
And you can utilize it by doing:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ SHELLS="fish:nu:bash:dash" ssh user@host
|
||||||
|
```
|
||||||
|
|
||||||
|
This will launch you into fish, if that fails, into nu and so on...
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
- [noshell](https://github.com/viperML/noshell): This was the primary source of
|
- [noshell](https://github.com/viperML/noshell): This was the primary source of
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue