mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-11-27 02:34:13 +08:00
Remove pkg-/theme- from folder name
When installing packages (plugins) or themes using a URL, we should strip the plugin-/pkg-/theme- from the repository name if it exists.
This commit is contained in:
parent
e9472b4e3f
commit
905f6afa73
|
@ -36,7 +36,7 @@ function omf.install -a type_flag name_or_url
|
|||
if test -e $OMF_PATH/db/$parent_path/$name_or_url
|
||||
set target $parent_path/$name_or_url
|
||||
else
|
||||
set -l local_name (basename $name_or_url)
|
||||
set -l local_name (basename $name_or_url | sed "s/^pkg-//;s/^plugin-//;s/^theme-//")
|
||||
if test -e $OMF_PATH/$parent_path/$local_name
|
||||
echo (omf::err)"Error: $local_name $install_type already installed."(omf::off) 1^&2
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user