update git doc to reflect current info, switch backticks to $().

This commit is contained in:
Aaron Bieber 2021-03-19 16:07:46 -06:00
parent 0c31f525dd
commit 434b815e34
3 changed files with 6 additions and 17 deletions

View File

@ -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 }')

View File

@ -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

View File

@ -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