installer: use tabs to allow future heredocs

This will allow us to use tab stripping heredocs with `<<-'.
See http://www.tldp.org/LDP/abs/html/here-docs.html#EX71A

Add editorconfig file to enforce this style.
See http://editorconfig.org for more information.
This commit is contained in:
Marc Cornellà 2016-08-09 02:28:47 +02:00
parent 2eb16ea8e3
commit ad1a26a7d4
2 changed files with 109 additions and 100 deletions

10
.editorconfig Normal file
View File

@ -0,0 +1,10 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
[*.sh]
indent_size = 4
indent_style = tab

View File

@ -75,7 +75,6 @@ main() {
exit 1 exit 1
} }
printf "${BLUE}Looking for an existing zsh config...${NORMAL}\n" printf "${BLUE}Looking for an existing zsh config...${NORMAL}\n"
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then
printf "${YELLOW}Found ~/.zshrc.${NORMAL} ${GREEN}Backing up to ~/.zshrc.pre-oh-my-zsh${NORMAL}\n"; printf "${YELLOW}Found ~/.zshrc.${NORMAL} ${GREEN}Backing up to ~/.zshrc.pre-oh-my-zsh${NORMAL}\n";
@ -116,7 +115,7 @@ main() {
echo '' echo ''
echo 'p.s. Follow us at https://twitter.com/ohmyzsh.' echo 'p.s. Follow us at https://twitter.com/ohmyzsh.'
echo '' echo ''
echo 'p.p.s. Get stickers and t-shirts at https://shop.planetargon.com.' echo 'p.p.s. Get stickers and t-shirts at http://shop.planetargon.com.'
echo '' echo ''
printf "${NORMAL}" printf "${NORMAL}"
env zsh env zsh