How do I change the width of a tab, for indentation, in single- and multi-line commands in ZSH? This is not the same as literal tabs; when you hit the tab key, ZSH actually emit spaces to the terminal:
zsh -f # Run without config
blackcap% echo $'\t.'
.
blackcap% .
blackcap% if
if> .
blackcap% tabs 4
blackcap% echo $'\t.'
.
blackcap% .
blackcap% if
if> .
This behavior is not affected by settings in my terminal emulator, setterm --regtabs
, nor by the promising-sounding IFS
variable mentioned in man zshparam
.
I could obviously write my own version and bind it to tab, but this last-resort quickly gets hairy when the cursor is moved, lines wrap, there are more than one line- not to mention >>
and friends with vi-keys.