Using OSH as a Default Shell - oils-for-unix/oils GitHub Wiki

At some point, you may want to change your default login shell to OSH from another shell. To do this:

  1. You must add your Oils executables to your system's list of available shell programs (typically in /etc/shells).

  2. You must tell your system to use an Oils executable as the default shell. On Linux and macOS you can use chsh to do this:

    chsh -s /absolute/path/to/osh
    

In Terminal Emulators

Many terminal emulators let you specify a startup command to run when the program opens. In Kitty, for example, you set the shell setting in your Kitty configuration file:

# ~/.config/kitty/kitty.conf

shell    osh -i

The -c (command) flag is described in man osh, but other available flags are not: Oils inherits many of its flags from the POSIX shell. See its man page for information about them. If you want to do special stuff on startup, other than run osh, you may need some of these options. You may need to add -i to force interactive mode.

# ~/.config/kitty/kitty.conf

# On startup, open OSH interactively and start a new Tmux session called "main"
# or attach to the existing "main" session.
#
shell    osh -ic "tmux new-session -s main -A"