Skip to content

Support zsh (and other non-bash shells) as the tmux session shell #1

Description

@dajaxx

Problem

Persisterm hardcodes bash as the shell inside tmux sessions (tmux.ts line 111):

set-option -g default-command "bash --rcfile ${CONFIG_SHELL_INIT}"

And uses PROMPT_COMMAND (bash-only) for the IPC socket refresh hook (lines 249-256).

Proposed fix

  1. Use $SHELL -l (login shell) instead of hardcoding bash --rcfile. Let the shell handle its own rc sourcing:
    set-option -g default-command "$SHELL -l"
  2. Inject the _persisterm_refresh hook using shell-appropriate syntax:
    • bash: PROMPT_COMMAND (current behavior)
    • zsh: add-zsh-hook precmd _persisterm_refresh
    • fish: function _persisterm_refresh --on-event fish_prompt

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions