tmux-poltergeist

January 17, 2026 ยท View on GitHub

Are you sick of typing the same thing over and over into your terminal? Do you ever wish you had a helpful pair of ghost hands to do your job?

tmux-poltergeist is a clipboard-like tool for pasting repetitive text. You can save text or commands in one of 10 paste buffers for quick injection into the terminal. So whether you want to input gnarly shell commands or just cat /proc/kallsyms, poltergeist is here to get the job done.

Commands

The following commands can be used for managing paste buffers.

KeyDescription
aadd from tmux paste buffer
sadd from current tmux selection
hadd from shell history
oadd from other pastebuf
eedit pastebuf with text editor
cclear pastebuf
wswap pastebufs
qexit popup

Contexts

Need more than 10 things in your clipboard? tmux-poltergeist supports switching between contexts, each of which is a separate set of 10 paste buffers.

The following commands are used for managing contexts:

KeyDescription
xSwitch to an existing context
XCreate a new context
-Delete a context

Installation

After installing the tmux plugin manager, you can add tmux-poltergeist to the list of plugins in your ~/.tmux.conf.

set -g @plugin 'dianoga-theory/tmux-poltergeist'

The default keybinding for launching tmux-poltergeist is <prefix-key> p. You can change the keybinding by setting @poltergeist_key (see below).

Configuration

tmux-poltergeist can be configured with the following variables. The following settings are the defaults.

set -g @poltergeist_key "p"
set -g @poltergeist_width "50"
set -g @poltergeist_height "18"
set -g @poltergeist_preview_chars "35"
set -g @poltergeist_headline_color "red"
set -g @poltergeist_bullet_color "green"
set -g @poltergeist_history_cmd "cut -d';' -f2- ~/.zhistory | tac | awk '!x[\$0]++' | tac | fzf --no-sort --tac"
set -g @poltergeist_editor "vim"

Related Projects

laktak created a similar tmux plugin for executing repetitive commands called tome. Compared to tmux-poltergeist, it has more scripting features, but potentially requires more keystrokes to execute commands.