diff --git a/completions/git.ksh b/completions/git.ksh index 5dc6895..40322b2 100755 --- a/completions/git.ksh +++ b/completions/git.ksh @@ -1,4 +1,4 @@ #: | git | add, fetch... | set -A complete_git_1 -- \ - `man -cT man git | grep -o 'git-[a-z-]*' | sort -u | cut -d '-' -f2-` \ - `git config --get-regexp ^alias\. | awk -F '[\. ]' '{ print $2 }'` + $(man -cT man git | grep -o 'git-[a-z-]*' | sort -u | cut -d '-' -f2-) \ + $(git config --get-regexp ^alias\. | awk -F '[\. ]' '{ print $2 }') diff --git a/completions/git.org b/completions/git.org index 6ac170e..2a93cec 100644 --- a/completions/git.org +++ b/completions/git.org @@ -3,20 +3,9 @@ The ~git~ completion currently supports the following arguments: ** Level 1 + #+begin_src ksh - add am archive \ - bisect branch bundle \ - checkout cherry-pick citool clean clone commit config \ - describe diff \ - fetch format-patch \ - gc grep gui \ - init \ - log \ - merge mv \ - notes \ - pull push \ - range-diff rebase reset restore revert rm \ - shortlog show sparse-checkout stash status submodule switch \ - tag \ + $(man -cT man git | grep -o 'git-[a-z-]*' | sort -u | cut -d '-' -f2-) \ + $(git config --get-regexp ^alias\. | awk -F '[\. ]' '{ print $2 }') worktree #+end_src diff --git a/completions/man.ksh b/completions/man.ksh index 182a4bd..cd5621f 100755 --- a/completions/man.ksh +++ b/completions/man.ksh @@ -1,7 +1,7 @@ #: | man | man pages | MAN_CACHE=$LOAD_PATH/cache/man if [ ! -f $MAN_CACHE ]; then - mkdir -p `dirname ${MAN_CACHE}` + mkdir -p $(dirname ${MAN_CACHE}) ls /usr/{share,X11R6,local}/man/man[1-9] | sort -u > $MAN_CACHE fi