Commit 280ec448116d001c3f5bd1ee18e286759393437c
1 parent
d535ba468a
name argument for bundle command is gone.
Showing 1 changed file with 4 additions and 23 deletions Side-by-side Diff
antigen.zsh
| ... | ... | @@ -2,24 +2,23 @@ |
| 2 | 2 | |
| 3 | 3 | # Each line in this string has the following entries separated by a space |
| 4 | 4 | # character. |
| 5 | -# <bundle-name>, <repo-url>, <plugin-location>, <repo-local-clone-dir>, | |
| 5 | +# <repo-url>, <plugin-location>, <repo-local-clone-dir>, | |
| 6 | 6 | # <bundle-type> |
| 7 | 7 | # FIXME: Is not kept local by zsh! |
| 8 | 8 | local _ANTIGEN_BUNDLE_RECORD="" |
| 9 | 9 | |
| 10 | 10 | # Syntaxes |
| 11 | -# bundle <url> [<loc>=/] [<name>] | |
| 11 | +# bundle <url> [<loc>=/] | |
| 12 | 12 | bundle () { |
| 13 | 13 | |
| 14 | 14 | # Bundle spec arguments' default values. |
| 15 | 15 | local url="$ANTIGEN_DEFAULT_REPO_URL" |
| 16 | 16 | local loc=/ |
| 17 | - local name= | |
| 18 | 17 | local btype=plugin |
| 19 | 18 | local load=true |
| 20 | 19 | |
| 21 | 20 | # Set spec values based on the positional arguments. |
| 22 | - local position_args='url loc name' | |
| 21 | + local position_args='url loc' | |
| 23 | 22 | local i=1 |
| 24 | 23 | while ! [[ -z $1 || $1 == --*=* ]]; do |
| 25 | 24 | local arg_name="$(echo "$position_args" | cut -d\ -f$i)" |
| ... | ... | @@ -47,7 +46,6 @@ bundle () { |
| 47 | 46 | # Resolve the url. |
| 48 | 47 | if [[ $url != git://* && $url != https://* ]]; then |
| 49 | 48 | url="${url%.git}" |
| 50 | - test -z "$name" && name="$(basename "$url")" | |
| 51 | 49 | url="https://github.com/$url.git" |
| 52 | 50 | fi |
| 53 | 51 | |
| ... | ... | @@ -55,18 +53,11 @@ bundle () { |
| 55 | 53 | local clone_dir="$ADOTDIR/repos/$(echo "$url" \ |
| 56 | 54 | | sed -e 's/\.git$//' -e 's./.-SLASH-.g' -e 's.:.-COLON-.g')" |
| 57 | 55 | |
| 58 | - # Make an intelligent guess about the name of the plugin, if not already | |
| 59 | - # done or is explicitly specified. | |
| 60 | - if [[ -z $name ]]; then | |
| 61 | - name="$(basename $(echo $url | sed 's/\.git$//')/$loc)" | |
| 62 | - fi | |
| 63 | - | |
| 64 | 56 | # Add it to the record. |
| 65 | - _ANTIGEN_BUNDLE_RECORD="$_ANTIGEN_BUNDLE_RECORD\n$name $url $loc $clone_dir $btype" | |
| 57 | + _ANTIGEN_BUNDLE_RECORD="$_ANTIGEN_BUNDLE_RECORD\n$url $loc $clone_dir $btype" | |
| 66 | 58 | |
| 67 | 59 | # Load it, unless specified otherwise. |
| 68 | 60 | if $load; then |
| 69 | - # bundle-load "$name" | |
| 70 | 61 | bundle-load "$clone_dir/$loc" "$btype" |
| 71 | 62 | fi |
| 72 | 63 | } |
| ... | ... | @@ -115,16 +106,6 @@ bundle-install () { |
| 115 | 106 | handled_repos="$handled_repos\n$url" |
| 116 | 107 | fi |
| 117 | 108 | |
| 118 | - if [[ $name != *.theme ]]; then | |
| 119 | - echo Installing $name | |
| 120 | - local bundle_dest="$ADOTDIR/bundles/$name" | |
| 121 | - test -e "$bundle_dest" && rm -rf "$bundle_dest" | |
| 122 | - ln -s "$clone_dir/$loc" "$bundle_dest" | |
| 123 | - else | |
| 124 | - mkdir -p "$ADOTDIR/bundles/$name" | |
| 125 | - cp "$clone_dir/$loc" "$ADOTDIR/bundles/$name" | |
| 126 | - fi | |
| 127 | - | |
| 128 | 109 | bundle-load "$clone_dir/$loc" "$btype" |
| 129 | 110 | |
| 130 | 111 | done |