Commit 0b4fbaaf6ad1056c6ca8e58062786d44cda3c698
1 parent
f783f38601
Get rid of backslashes wherever possible.
Apparently lines ending in an operator don't need a `\` to continue to next line. Realised this thanks to @Tarrasch's pull request.
Showing 1 changed file with 18 additions and 18 deletions Side-by-side Diff
antigen.zsh
| ... | ... | @@ -71,8 +71,8 @@ antigen-bundle () { |
| 71 | 71 | # these two conditions, either the `--no-local-clone` option should be |
| 72 | 72 | # given, or `$url` should not a git repo. |
| 73 | 73 | local make_local_clone=true |
| 74 | - if [[ $url == /* && -z $branch \ | |
| 75 | - && ( $no_local_clone == true || ! -d $url/.git ) ]]; then | |
| 74 | + if [[ $url == /* && -z $branch && | |
| 75 | + ( $no_local_clone == true || ! -d $url/.git ) ]]; then | |
| 76 | 76 | make_local_clone=false |
| 77 | 77 | fi |
| 78 | 78 | |
| ... | ... | @@ -97,9 +97,9 @@ antigen-bundle () { |
| 97 | 97 | local url="$1" |
| 98 | 98 | |
| 99 | 99 | # Expand short github url syntax: `username/reponame`. |
| 100 | - if [[ $url != git://* && \ | |
| 101 | - $url != https://* && \ | |
| 102 | - $url != /* && \ | |
| 100 | + if [[ $url != git://* && | |
| 101 | + $url != https://* && | |
| 102 | + $url != /* && | |
| 103 | 103 | $url != git@github.com:*/* |
| 104 | 104 | ]]; then |
| 105 | 105 | url="https://github.com/${url%.git}.git" |
| ... | ... | @@ -124,10 +124,10 @@ antigen-bundles () { |
| 124 | 124 | |
| 125 | 125 | antigen-update () { |
| 126 | 126 | # Update your bundles, i.e., `git pull` in all the plugin repos. |
| 127 | - -antigen-echo-record \ | |
| 128 | - | awk '{print $1}' \ | |
| 129 | - | sort -u \ | |
| 130 | - | while read url; do | |
| 127 | + -antigen-echo-record | | |
| 128 | + awk '{print $1}' | | |
| 129 | + sort -u | | |
| 130 | + while read url; do | |
| 131 | 131 | echo "**** Pulling $url" |
| 132 | 132 | -antigen-ensure-repo --update --verbose "$url" |
| 133 | 133 | echo |
| ... | ... | @@ -288,12 +288,12 @@ antigen-cleanup () { |
| 288 | 288 | |
| 289 | 289 | # Find directores in ADOTDIR/repos, that are not in the bundles record. |
| 290 | 290 | local unused_clones="$(comm -13 \ |
| 291 | - <(-antigen-echo-record \ | |
| 292 | - | awk '$4 == "true" {print $1}' \ | |
| 293 | - | while read line; do | |
| 291 | + <(-antigen-echo-record | | |
| 292 | + awk '$4 == "true" {print $1}' | | |
| 293 | + while read line; do | |
| 294 | 294 | -antigen-get-clone-dir "$line" |
| 295 | - done \ | |
| 296 | - | sort -u) \ | |
| 295 | + done | | |
| 296 | + sort -u) \ | |
| 297 | 297 | <(ls -d "$ADOTDIR/repos/"* | sort -u))" |
| 298 | 298 | |
| 299 | 299 | if [[ -z $unused_clones ]]; then |
| ... | ... | @@ -302,11 +302,11 @@ antigen-cleanup () { |
| 302 | 302 | fi |
| 303 | 303 | |
| 304 | 304 | echo 'You have clones for the following repos, but are not used.' |
| 305 | - echo "$unused_clones" \ | |
| 306 | - | while read line; do | |
| 305 | + echo "$unused_clones" | | |
| 306 | + while read line; do | |
| 307 | 307 | -antigen-get-clone-url "$line" |
| 308 | - done \ | |
| 309 | - | sed -e 's/^/ /' -e 's/|/, branch /' | |
| 308 | + done | | |
| 309 | + sed -e 's/^/ /' -e 's/|/, branch /' | |
| 310 | 310 | |
| 311 | 311 | if $force || (echo -n '\nDelete them all? [y/N] '; read -q); then |
| 312 | 312 | echo |