diff options
author | Chris Copeland <chris@chrisnc.net> | 2022-07-23 19:51:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-24 02:51:16 +0000 |
commit | c3f3bd36669fc6cf6c5998bfe54cb90ae58dde8f (patch) | |
tree | 821c44df359b80a48ed7e59034268bbba58fa5ab /rustfmt.toml | |
parent | ed4614d0bd2a828a9d89347ad675d4564a3af754 (diff) | |
download | alacritty-c3f3bd36669fc6cf6c5998bfe54cb90ae58dde8f.tar.gz alacritty-c3f3bd36669fc6cf6c5998bfe54cb90ae58dde8f.zip |
Register Alacritty shells as tty sessions on macOS
Unless the `shell` config is specified, launch the user's shell with:
```sh
login -flp $USER /bin/sh -c "exec -a -shell /path/to/shell"
```
On macOS, just running a shell prefixed by `-` is not sufficient to be
registered as a login session for things like `w` and `logname`.
However, using the `login` command changes the directory to `$HOME`
before running the program by default, which is not desired. The `-l`
flag disables this behavior, but also skips prepending `-` to the
executed program, so shells will not run as login shells. Instead we
just do this part ourselves with `exec -a`. The result is login shells
that run in the intended directory and are registered as tty sessions.
Fixes #3420.
Diffstat (limited to 'rustfmt.toml')
0 files changed, 0 insertions, 0 deletions