add ghostty shell integration for emacs

This commit is contained in:
wake 2026-04-15 09:26:16 +02:00
parent 06c1f12a22
commit bb2f21a19d

View file

@ -2,11 +2,18 @@
git clone --recursive https://github.com/changs/slimzsh.git ~/.slimzsh git clone --recursive https://github.com/changs/slimzsh.git ~/.slimzsh
git clone https://github.com/dakra/ghostel.git /tmp/ghostel
cp /tmp/ghostel/etc/ghostel.zsh ~/.ghostel.zsh
rm -fr /tmp/ghostel
cat <<EOF > $HOME/.zshrc cat <<EOF > $HOME/.zshrc
HISTSIZE=10000 HISTSIZE=10000
SAVEHIST=10000 SAVEHIST=10000
[[ \$TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return [[ \$TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return
[[ \$TERM =~ "eterm" ]] && INSIDE_EMACS=yes [[ \$TERM =~ "eterm" ]] && INSIDE_EMACS=yes
# zsh (~/.zshrc)
[[ "$INSIDE_EMACS" = 'ghostel' ]] && \
source "$HOME/.ghostel.zsh"
zstyle ':prompt:pure:user:root' color red zstyle ':prompt:pure:user:root' color red
zstyle ':prompt:pure:host' color cyan zstyle ':prompt:pure:host' color cyan
source "$HOME/.slimzsh/slim.zsh" source "$HOME/.slimzsh/slim.zsh"