A vterm section for Spaceship prompt
The emacs-libvterm uses escape sequences to
communicate information from the emulated shell back to emacs, and does so by modifing the
shell's prompt. spaceship
overrides the prompt with $(spaceship::prompt)
, so a custom section is required to
integrate emacs-libvterm
.
This plugin uses the spaceship-section template.
You need to source this plugin somewhere in your dotfiles. Here's how to do it with some popular tools:
Execute this command to clone this repo into Oh-My-Zsh plugin's folder:
git clone https://github.com/bbarg/spaceship-vterm.git $ZSH_CUSTOM/plugins/spaceship-vterm
Include spaceship-vterm
in Oh-My-Zsh plugins list:
plugins=($plugins spaceship-vterm)
zplug "bbarg/spaceship-vterm"
antigen bundle "bbarg/spaceship-vterm"
antibody bundle "bbarg/spaceship-vterm"
zinit light "bbarg/spaceship-vterm"
zgen load "bbarg/spaceship-vterm"
[plugins.spaceship-vterm]
github = "bbarg/spaceship-vterm"
If none of the above methods works for you, you can install Spaceship manually.
- Clone this repo somewhere, for example to
$HOME/.zsh/spaceship-vterm
. - Source this section in your
~/.zshrc
.
mkdir -p "$HOME/.zsh"
git clone --depth=1 https://github.com/bbarg/spaceship-vterm.git "$HOME/.zsh/spaceship-vterm"
For initializing prompt system add this to your .zshrc
:
source "~/.zsh/spaceship-vterm/spaceship-vterm.plugin.zsh"
After installing, add the following line to your .zshrc
in order to include vterm in the prompt:
spaceship add vterm
This vterm is shown only in directories within a vterm context.
Variable | Default | Meaning |
---|---|---|
SPACESHIP_VTERM_ENABLE |
true |
Enable the section |
SPACESHIP_VTERM_SHOW |
false |
Whether to show the string vterm in the prompt |
SPACESHIP_VTERM_ASYNC |
true |
Evaluate asynchronously |
First, thanks for your interest in contributing!
Contribute to this repo by submitting a pull request. Please use conventional commits, since this project adheres to semver and is automatically released via semantic-release.
- Support message passing
- Functional tests
MIT © Ben Barg