eecms.plugin.zsh 449 B

1234567891011121314151617181920
  1. # ExpressionEngine CMS basic command completion
  2. _eecms_console () {
  3. echo "php $(find . -maxdepth 3 -mindepth 1 -name 'eecms' -type f | head -n 1)"
  4. }
  5. _eecms_get_command_list () {
  6. `_eecms_console` | sed "/Available commands/,/^/d" | sed "s/[[:space:]].*//g"
  7. }
  8. _eecms () {
  9. compadd `_eecms_get_command_list`
  10. }
  11. compdef _eecms '`_eecms_console`'
  12. compdef _eecms 'system/ee/eecms'
  13. compdef _eecms eecms
  14. #Alias
  15. alias eecms='`_eecms_console`'