Skip to content

feat: add multiple shell profiles support#1443

Open
OleksandrKucherenko wants to merge 10 commits intoraphamorim:mainfrom
OleksandrKucherenko:feature/multiple-shell-profiles
Open

feat: add multiple shell profiles support#1443
OleksandrKucherenko wants to merge 10 commits intoraphamorim:mainfrom
OleksandrKucherenko:feature/multiple-shell-profiles

Conversation

@OleksandrKucherenko
Copy link
Copy Markdown

Closes #622

Summary

This PR adds support for multiple shell profiles in Rio terminal, allowing users to:

  1. Define a default shell via [shell] (existing behavior)
  2. Define additional shell profiles via [[shells]] array
  3. Use Ctrl+Shift+T to create tabs with the default profile (unchanged)
  4. Use Ctrl+Shift+Y to open a profile selector to choose which shell to use

Configuration Example

# Default shell
[shell]
program = "pwsh"
args = []

# Additional shell profiles
[[shells]]
name = "WSL"
program = "C:\\Windows\\System32\\wsl.exe"
args = []

[[shells]]
name = "CMD"
program = "C:\\Windows\\System32\\cmd.exe"
args = []

Profile Selector

When you press Ctrl+Shift+Y (or Cmd+Y on macOS), a selector overlay appears:

  • Use j/k or arrow keys to navigate
  • Press 1-9 to directly select a profile
  • Press Enter to confirm selection
  • Press Escape to cancel

Changes

  • Extended Shell struct with optional name field
  • Added shells: Vec<Shell> field to Config
  • Added ShellProfileSelector action with keybinding
  • Created ShellSelector state module for managing selector UI
  • Added create_tab_with_shell() method for creating tabs with specific shells
  • Created shell selector UI renderer
  • Integrated keyboard navigation and rendering
  • Updated documentation with examples

Testing

  1. Add shell profiles to your config
  2. Press Ctrl+Shift+Y to open selector
  3. Navigate and select a profile
  4. Verify a new tab opens with the selected shell

🤖 Generated with Claude Code

alexkucherenko and others added 10 commits February 24, 2026 17:37
Implements raphamorim#622 - Multiple configuration profiles and selector

This adds support for defining multiple shell profiles and a quick
selector to switch between them when creating new tabs.

## Configuration
- `[shell]` - Default shell (unchanged behavior)
- `[[shells]]` - Array of additional shell profiles with optional name

## Keybindings
- `Ctrl+Shift+T` / `Cmd+T`: Create tab with default shell (unchanged)
- `Ctrl+Shift+Y` / `Cmd+Y`: Open shell profile selector overlay

## Profile Selector
- Navigate with j/k or arrow keys
- Press 1-9 to directly select a profile
- Press Enter to confirm, Escape to cancel

## Example config:
```toml
[shell]
program = "pwsh"
args = []

[[shells]]
name = "WSL"
program = "C:\\Windows\\System32\\wsl.exe"
args = []

[[shells]]
name = "CMD"
program = "C:\\Windows\\System32\\cmd.exe"
args = []
```

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add missing shells field in ContextManagerConfig
- Fix border_radius type (f32 -> [f32; 4])
- Remove unused `shells` field from ContextManagerConfig (was stored but never read)
- Update shell_selector when config is hot-reloaded (allows dynamic shell list changes)
- Refactor tests to use create_dead_context instead of create_context
- This prevents forking ~40+ real shell processes during tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] multiple configuration profiles and selector/manager.

2 participants