diff options
Diffstat (limited to 'roles/git/files/git-shell-commands/help')
-rw-r--r-- | roles/git/files/git-shell-commands/help | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/roles/git/files/git-shell-commands/help b/roles/git/files/git-shell-commands/help new file mode 100644 index 0000000..9e37fd2 --- /dev/null +++ b/roles/git/files/git-shell-commands/help @@ -0,0 +1,24 @@ +#!/bin/sh +# +# /usr/local/share/git-core/contrib/git-shell-commands/help +# +# Aaron LI +# 2017-06-18 +# + +if tty -s; then + echo "Run 'help' for help, or 'exit' to leave. Available commands:" +else + echo "Run 'help' for help. Available commands:" +fi + +dir=$(dirname "$0") +cd "${dir}" + +for cmd in *; do + case "${cmd}" in + help) ;; + *.disabled) ;; + *) [ -f "${cmd}" ] && [ -x "${cmd}" ] && echo "${cmd}" ;; + esac +done |