zsh: drop sed for regexp-replace and use zstyle to avoid hardcoding things in a script

Zsh has regexp-replace, you don&rsquo;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"