Pretty-print for shell script
问题 I'm looking for something similiar to indent but for (bash) scripts. Console only, no colorizing, etc. Do you know of one ? 回答1: Vim can indent bash scripts. But not reformat them before indenting. Backup your bash script, open it with vim, type gg=GZZ and indent will be corrected. (Note for the impatient: this overwrites the file, so be sure to do that backup!) Though, some bugs with << (expecting EOF as first character on a line) e.g. EDIT: ZZ not ZQ 回答2: A bit late to the party, but it