From 434b815e34c6b40e17eca7af8ecfd46e1c146009 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Fri, 19 Mar 2021 16:07:46 -0600 Subject: [PATCH] update git doc to reflect current info, switch backticks to $(). --- completions/git.ksh | 4 ++-- completions/git.org | 17 +++-------------- completions/man.ksh | 2 +- 3 files changed, 6 insertions(+), 17 deletions(-) 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