Shell profiles
A shell profile tells Cogno how to start one shell: which program, with which arguments, in which directory. Every new tab starts a profile.
You already have profiles
Section titled “You already have profiles”On first launch Cogno looks for installed shells and writes a profile for each one into your config file:
| Platform | Detected shells | Default |
|---|---|---|
| macOS, Linux | every Zsh and Bash listed in /etc/shells | Zsh if present, otherwise Bash |
| Windows | Windows PowerShell and PowerShell 7 (pwsh) | the first PowerShell found |
This only happens while no profile exists. Afterwards the profiles are yours to edit.
A profile
Section titled “A profile”shell.profiles.zsh.shell_type = ZSHshell.profiles.zsh.path = /bin/zshshell.profiles.zsh.args = [-l, -i]shell.profiles.zsh.working_dir = ~zsh is the profile name. You choose it; it appears in menus. Use only letters, digits and
_ if you want to reference the profile in a keybinding.
| Setting | Required | Meaning |
|---|---|---|
shell_type | yes | ZSH, Bash or PowerShell. Other shells, such as fish, are not supported. |
path | yes | Path of the shell executable. |
args | no | Arguments passed to the shell. |
working_dir | no | Directory the shell starts in. Default: ~ |
env.<var> | no | Extra environment variables, e.g. env.EDITOR = nvim |
enable_shell_integration | no | Load Cogno’s shell integration. Default: true |
inject_cogno_cli | no | Put the cogno command on the shell’s PATH. Default: true |
load_user_rc | no | Load your own startup files such as .zshrc, .bashrc or the PowerShell profile. Default: true |
Changes to a profile apply to terminals you open afterwards.
Set load_user_rc = false for a clean shell without your aliases, plugins and prompt theme —
useful to rule out your own configuration when something misbehaves. PATH is still taken
from your login environment.
Default and order
Section titled “Default and order”shell.default = zshshell.order = [zsh, bash]shell.defaultis the profile a new tab starts. It must name an existing profile.shell.orderis the order in menus. Every entry must name an existing profile.- You can define at most 9 profiles.
Open a profile with a key
Section titled “Open a profile with a key”The actions open_shell_1 … open_shell_9 open a new tab with the profile in that
position. By default they are on Ctrl+Shift+1 … 9 (Command+Shift+1 … 9 on macOS).
Position 1 is always the default profile. The profiles from shell.order follow, then any
remaining profiles.
To bind a key to a profile by name, pass the name to new_tab:
keybind = Ctrl+Alt+B=new_tab:bashExample: two profiles
Section titled “Example: two profiles”shell.default = zshshell.order = [zsh, work]
shell.profiles.zsh.shell_type = ZSHshell.profiles.zsh.path = /bin/zshshell.profiles.zsh.args = [-l, -i]
shell.profiles.work.shell_type = Bashshell.profiles.work.path = /opt/homebrew/bin/bashshell.profiles.work.working_dir = ~/projects/workshell.profiles.work.env.AWS_PROFILE = workAll profile settings are listed under Shell in the settings reference.