X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fgrails%2Fgrails.plugin.zsh;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fgrails%2Fgrails.plugin.zsh;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=ddc25742861a41e12cd8932f57181ed36d086740;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/plugins/grails/grails.plugin.zsh b/stow/oh-my-zsh/.oh-my-zsh/plugins/grails/grails.plugin.zsh deleted file mode 100644 index ddc2574..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/plugins/grails/grails.plugin.zsh +++ /dev/null @@ -1,60 +0,0 @@ -_enumerateGrailsScripts() { - # Default directories - directories=($GRAILS_HOME/scripts ~/.grails/scripts ./scripts) - - # Check all of the plugins directories, if they exist - if [ -d plugins ] - then - directories+=(plugins/*/scripts) - fi - - # Enumerate all of the Groovy files - files=() - for dir in $directories; - do - if [ -d $dir ] - then - files+=($dir/[^_]*.groovy) - fi - done - - # Don't try to basename () - if [ ${#files} -eq 0 ]; - then - return - fi - - scripts=() - for file in $files - do - # - Strip the path - # - Remove all scripts with a leading '_' - # - PackagePlugin_.groovy -> PackagePlugin - # - PackagePlugin -> Package-Plugin - # - Package-Plugin -> package-plugin - command=$(basename $file \ - | sed -E -e 's/^_?([^_]+)_?.groovy/\1/'\ - -e 's/([a-z])([A-Z])/\1-\2/g' \ - | tr "[:upper:]" "[:lower:]" \ - | sort \ - | uniq) - scripts+=($command) - done - echo $scripts -} - -_grails() { - if (( CURRENT == 2 )); then - scripts=( $(_enumerateGrailsScripts) ) - - if [ ${#scripts} -ne 0 ]; - then - _multi_parts / scripts - return - fi - fi - - _files -} - -compdef _grails grails