Remove .git$ from name when installing from URL

Support `omf install https://github.com/oh-my-fish/plugin-jump.git`
pull/121/head
Bruno Pinto 9 years ago committed by Pablo Santiago Blum de Aguiar
parent cc7b321268
commit e234aab3c6

@ -19,7 +19,7 @@ function omf.install -a name_or_url
set name $name_or_url
set url (cat $OMF_PATH/db/$parent_path/$name_or_url)
else
set name (basename $name_or_url | sed "s/^pkg-//;s/^plugin-//;s/^theme-//")
set name (basename $name_or_url | sed 's/^pkg-//;s/^plugin-//;s/^theme-//;s/\.git$//')
set url $name_or_url
end

Loading…
Cancel
Save