// ZSH-SED-SUB — GLOBAL SEARCH-AND-REPLACE ON THE COMMAND LINE

zsh plugin · 2 ZLE widgets · rewrite the current command line in place via sed-style substitution

GitHub Issues
// Color scheme

>_ZSH-SED-SUB

Rewrite the current command line in place. Two ZLE keybindings that do a global search-and-replace on the current buffer. Try it out with Ctrl-F Ctrl-P.

Install

# Zinit
zinit ice lucid nocompile
zinit load MenkeTechnologies/zsh-sed-sub

# Oh My Zsh
git clone https://github.com/MenkeTechnologies/zsh-sed-sub \
    "$HOME/.oh-my-zsh/custom/plugins/zsh-sed-sub"
# then: plugins+=(zsh-sed-sub)

# Manual
git clone https://github.com/MenkeTechnologies/zsh-sed-sub
source zsh-sed-sub/zsh-sed-sub.plugin.zsh

Key bindings

Ctrl-F Ctrl-Pglobal sed-style substitution on the current buffer — prompts for pattern and replacement, rewrites BUFFER in place

Sibling plugins

Part of the MenkeTechnologies zsh plugin family — the MenkeTechnologiesMeta umbrella: