From 9d8187ba6b322260747901a42c62770ab314007f Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 2 Apr 2012 20:18:03 -0400 Subject: [PATCH] Merge completions into functions Completions are nothing more than auto-loadable functions prefixed with an underscore placed somewhere in $FPATH. --- .gitmodules | 6 +++--- helper.zsh | 4 ++-- modules/archive/{completions => functions}/_extract | 0 modules/archive/{completions => functions}/_ls-archive | 0 modules/completion/completions | 1 - modules/completion/functions | 1 + modules/git/{completions => functions}/_git-hub | 0 modules/git/{completions => functions}/_git-hub-short-url | 0 modules/git/{completions => functions}/_git-info | 0 modules/perl/{completions => functions}/_prep | 0 modules/perl/{completions => functions}/_psub | 0 modules/wakeonlan/{completions => functions}/_wake | 0 12 files changed, 6 insertions(+), 6 deletions(-) rename modules/archive/{completions => functions}/_extract (100%) rename modules/archive/{completions => functions}/_ls-archive (100%) delete mode 160000 modules/completion/completions create mode 160000 modules/completion/functions rename modules/git/{completions => functions}/_git-hub (100%) rename modules/git/{completions => functions}/_git-hub-short-url (100%) rename modules/git/{completions => functions}/_git-info (100%) rename modules/perl/{completions => functions}/_prep (100%) rename modules/perl/{completions => functions}/_psub (100%) rename modules/wakeonlan/{completions => functions}/_wake (100%) diff --git a/.gitmodules b/.gitmodules index 5d6a7dd..792f12c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ -[submodule "modules/completion/completions"] - path = modules/completion/completions - url = https://github.com/zsh-users/zsh-completions.git [submodule "modules/history-substring-search/external"] path = modules/history-substring-search/external url = https://github.com/zsh-users/zsh-history-substring-search.git [submodule "modules/syntax-highlighting/external"] path = modules/syntax-highlighting/external url = https://github.com/zsh-users/zsh-syntax-highlighting.git +[submodule "modules/completion/functions"] + path = modules/completion/functions + url = https://github.com/zsh-users/zsh-completions.git diff --git a/helper.zsh b/helper.zsh index f05eaa5..612d7a2 100644 --- a/helper.zsh +++ b/helper.zsh @@ -32,8 +32,8 @@ function omodload { # Extended globbing is needed for autoloading of module functions. setopt EXTENDED_GLOB - # Add functions and completions to fpath. - fpath=(${argv:+${OMZ}/modules/${^argv}/{functions,completions}(/FN)} $fpath) + # Add functions to fpath. + fpath=(${argv:+${OMZ}/modules/${^argv}/functions(/FN)} $fpath) # Load Oh My Zsh functions. for ofunction in $OMZ/modules/**/functions/^([_.]*|prompt_*_setup)(.N:t); do diff --git a/modules/archive/completions/_extract b/modules/archive/functions/_extract similarity index 100% rename from modules/archive/completions/_extract rename to modules/archive/functions/_extract diff --git a/modules/archive/completions/_ls-archive b/modules/archive/functions/_ls-archive similarity index 100% rename from modules/archive/completions/_ls-archive rename to modules/archive/functions/_ls-archive diff --git a/modules/completion/completions b/modules/completion/completions deleted file mode 160000 index b877df4..0000000 --- a/modules/completion/completions +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b877df4e7090c9a45da6a4c5f25d8ad172ed2639 diff --git a/modules/completion/functions b/modules/completion/functions new file mode 160000 index 0000000..8b89dd9 --- /dev/null +++ b/modules/completion/functions @@ -0,0 +1 @@ +Subproject commit 8b89dd9d10e86313f49fafdf88e8540f97346f33 diff --git a/modules/git/completions/_git-hub b/modules/git/functions/_git-hub similarity index 100% rename from modules/git/completions/_git-hub rename to modules/git/functions/_git-hub diff --git a/modules/git/completions/_git-hub-short-url b/modules/git/functions/_git-hub-short-url similarity index 100% rename from modules/git/completions/_git-hub-short-url rename to modules/git/functions/_git-hub-short-url diff --git a/modules/git/completions/_git-info b/modules/git/functions/_git-info similarity index 100% rename from modules/git/completions/_git-info rename to modules/git/functions/_git-info diff --git a/modules/perl/completions/_prep b/modules/perl/functions/_prep similarity index 100% rename from modules/perl/completions/_prep rename to modules/perl/functions/_prep diff --git a/modules/perl/completions/_psub b/modules/perl/functions/_psub similarity index 100% rename from modules/perl/completions/_psub rename to modules/perl/functions/_psub diff --git a/modules/wakeonlan/completions/_wake b/modules/wakeonlan/functions/_wake similarity index 100% rename from modules/wakeonlan/completions/_wake rename to modules/wakeonlan/functions/_wake