Skip to content

Support more shells in wrap_term_launch.sh#1470

Open
LavedenC1 wants to merge 1 commit into
caelestia-dots:mainfrom
LavedenC1:shell-wrapper-fix
Open

Support more shells in wrap_term_launch.sh#1470
LavedenC1 wants to merge 1 commit into
caelestia-dots:mainfrom
LavedenC1:shell-wrapper-fix

Conversation

@LavedenC1

@LavedenC1 LavedenC1 commented May 12, 2026

Copy link
Copy Markdown

Ghostty and other terminals need the -e flag.

Useful when launching apps like neovim from application menu, or opening anything terminal related from the menu.

First contribution!

Copilot AI review requested due to automatic review settings May 12, 2026 20:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates assets/wrap_term_launch.sh to try to support additional terminal emulators (e.g., Ghostty) that require an -e flag when executing a command, so “run in terminal” app launches work across more terminals.

Changes:

  • Adds terminal-name detection for ghostty, alacritty, konsole, and xterm, attempting to re-exec them with -e.
  • Replaces exec "$@" with string-based command manipulation and a final exec $COMMAND.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +5 to +24
COMMAND="$@"

if [ "$1" = "ghostty" ]; then
exec ghostty -e ${COMMAND#*ghostty }
fi

if [ "$1" = "alacritty" ]; then
exec alacritty -e ${COMMAND#*alacritty }
fi

if [ "$1" = "konsole" ]; then
exec konsole -e ${COMMAND#*konsole }
fi

if [ "$1" = "xterm" ]; then
exec xterm -e ${COMMAND#*xterm }
fi


exec $COMMAND
Comment on lines +5 to +24
COMMAND="$@"

if [ "$1" = "ghostty" ]; then
exec ghostty -e ${COMMAND#*ghostty }
fi

if [ "$1" = "alacritty" ]; then
exec alacritty -e ${COMMAND#*alacritty }
fi

if [ "$1" = "konsole" ]; then
exec konsole -e ${COMMAND#*konsole }
fi

if [ "$1" = "xterm" ]; then
exec xterm -e ${COMMAND#*xterm }
fi


exec $COMMAND
@Wekendd

Wekendd commented May 15, 2026

Copy link
Copy Markdown

You can just add the -e flag to the shell.json configuration:

"general": {
    "apps": {
        "terminal": ["ghostty", "-e"],
        ...
    }
}

Though there is a permissions issue if you aren't using nix, which I've made a PR for in #1476

@LavedenC1

Copy link
Copy Markdown
Author

You can just add the -e flag to the shell.json configuration:

"general": {
    "apps": {
        "terminal": ["ghostty", "-e"],
        ...
    }
}

Though there is a permissions issue if you aren't using nix, which I've made a PR for in #1476

Most people won't if you think about it, because they don't launch their shells from the cli and execute a command their.

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.

3 participants