Merge pull request #97 from oh-my-fish/fishy_uninstall

Fishy packages
This commit is contained in:
Bruno 2015-10-03 22:40:15 +01:00
commit 436e0306df
6 changed files with 18 additions and 20 deletions

View File

@ -16,7 +16,7 @@ function require -a name
and return 0
for path in {$OMF_PATH,$OMF_CONFIG}/pkg/$name
if autoload $path $path/completions
if autoload $path $path/functions $path/completions
source $path/init.fish ^/dev/null;
or source $path/$name.fish ^/dev/null;

View File

@ -15,7 +15,7 @@ function omf.remove_package
for path in {$OMF_PATH,$OMF_CONFIG}/{pkg}/$pkg
not test -d $path; and continue
emit uninstall_$pkg
source $path/uninstall.fish; and emit uninstall_$pkg
omf.bundle.remove "package" $pkg
rm -rf $path

View File

@ -0,0 +1,10 @@
# SYNOPSIS
# {{NAME}} [options]
#
# USAGE
# Options
#
function {{NAME}} -d "My package"
end

View File

@ -0,0 +1,3 @@
function init -a path --on-event init_{{NAME}}
end

View File

@ -0,0 +1,3 @@
function uninstall --on-event uninstall_{{NAME}}
end

View File

@ -1,18 +0,0 @@
# SYNOPSIS
# {{NAME}} [options]
#
# USAGE
# Options
#
function init -a path --on-event init_{{NAME}}
end
function {{NAME}} -d "My package"
end
function uninstall --on-event uninstall_{{NAME}}
end