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"