Padding a string with zsh
07 Apr 2023To pad a string with leading spaces in zs, you can use ${(r(15)( ))variableName)
.
r(15)
pads on ther
ight (usel
forl
eft padding)- The
15
defines the maximum length of the string ( )
defines the character to use for padding (here, aspace)
Want to add something ? Feel free to get in touch on Twitter : @pixelastic