mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-03 15:40:32 +00:00
Merge pull request #518 from fish-shell/no-def-plus-template
No def plus template
This commit is contained in:
commit
62a195fa7b
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,7 +3,6 @@ pkg/**
|
||||
!pkg/omf/**
|
||||
|
||||
themes/**
|
||||
!themes/default/*
|
||||
|
||||
.DS_Store
|
||||
**/.DS_Store
|
||||
|
@ -103,7 +103,7 @@ omf_install() {
|
||||
if [ ! -d "${OMF_CONFIG}" ]; then
|
||||
echo "Writing Oh My Fish configuration → ${OMF_CONFIG}"
|
||||
mkdir -p "${OMF_CONFIG}"
|
||||
test -f "${OMF_CONFIG}/theme" || echo default > "${OMF_CONFIG}/theme"
|
||||
touch "${OMF_CONFIG}/theme"
|
||||
test -f "${OMF_CONFIG}/revision" || echo ${git_rev} > "${OMF_CONFIG}/revision"
|
||||
fi
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
function omf_list_themes
|
||||
set -l seen ""
|
||||
for theme in (basename $OMF_PATH/db/themes/*) \
|
||||
(basename {$OMF_PATH,$OMF_CUSTOM}/themes/*)
|
||||
(basename {$OMF_PATH,$OMF_CUSTOM}/themes/*)
|
||||
contains $theme $seen; or echo $theme
|
||||
set seen $seen $theme
|
||||
end
|
||||
|
@ -23,7 +23,7 @@ function omf_new -a option name
|
||||
set -l user (git config user.name)
|
||||
test -z "$user"; and set user "{{USERNAME}}"
|
||||
|
||||
omf_new_from_template "$OMF_PATH/pkg/wa/templates/$option" \
|
||||
omf_new_from_template "$OMF_PATH/pkg/omf/templates/$option" \
|
||||
$github $user $name
|
||||
|
||||
echo (omf::em)"Switched to $dir"(omf::off)
|
||||
|
@ -13,12 +13,8 @@ function omf_remove_package
|
||||
emit uninstall_$pkg
|
||||
rm -rf $OMF_PATH/pkg/$pkg
|
||||
else if test -d $OMF_PATH/themes/$pkg
|
||||
if test $pkg = default
|
||||
echo (omf::err)"You can't remove the default theme"(omf::off) 1^&2
|
||||
return $OMF_INVALID_ARG
|
||||
end
|
||||
if test $pkg = (cat $OMF_CONFIG/theme)
|
||||
omf_theme "default"
|
||||
echo "" > $OMF_CONFIG/theme
|
||||
end
|
||||
rm -rf $OMF_PATH/themes/$pkg
|
||||
end
|
||||
|
@ -76,7 +76,7 @@ function omf -d "Oh My Fish"
|
||||
return $OMF_INVALID_ARG
|
||||
end
|
||||
|
||||
case "r" "rm" "remove" "uninstall"
|
||||
case "r" "rem" "rm" "remove" "uninstall"
|
||||
if test (count $argv) -ne 2
|
||||
echo (omf::err)"Invalid number of arguments"(omf::off) 1^&2
|
||||
echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" <[package|theme] name>" 1^&2
|
||||
|
Loading…
Reference in New Issue
Block a user