Wesley Schwengle IncludeIf: A digital space written in pencil Articles Series Answerrit /dev/null About IncludeIf: A digital space written in pencil Devs /dev/null zsh: drop sed for regexp-replace and use zstyle to avoid hardcoding things in a script

You might also like

Zsh has regexp-replace, you don’t need sed:

autoload regexp-replace regexp-replace line '^pick' 'f'

Also, instead of hard coding values, use zstyle:

# in your .zshrc zstyle ':xyz:xyz:terminal' terminal "kitty" # in your script/function local myterm zstyle -s ':xyz:xyz:terminal' terminal myterm || myterm="Eterm"