Przeglądaj źródła

Merge pull request #822 from jasonkarns/completion

Add --help and tab completion to rbenv-versions
pull/487/head^2
Mislav Marohnić 8 lat temu
rodzic
commit
5fb9c84e14
4 zmienionych plików z 22 dodań i 2 usunięć
  1. +5
    -0
      libexec/rbenv-completions
  2. +1
    -2
      libexec/rbenv-help
  3. +11
    -0
      libexec/rbenv-init
  4. +5
    -0
      libexec/rbenv-versions

+ 5
- 0
libexec/rbenv-completions Wyświetl plik

@ -10,6 +10,11 @@ if [ -z "$COMMAND" ]; then
exit 1
fi
# Provide rbenv completions
if [ "$COMMAND" = "--complete" ]; then
exec rbenv-commands
fi
COMMAND_PATH="$(command -v "rbenv-$COMMAND" || command -v "rbenv-sh-$COMMAND")"
# --help is provided automatically

+ 1
- 2
libexec/rbenv-help Wyświetl plik

@ -18,8 +18,7 @@ set -e
# Provide rbenv completions
if [ "$1" = "--complete" ]; then
echo --usage
rbenv-commands
exit
exec rbenv-commands
fi
command_path() {

+ 11
- 0
libexec/rbenv-init Wyświetl plik

@ -5,6 +5,17 @@
set -e
[ -n "$RBENV_DEBUG" ] && set -x
# Provide rbenv completions
if [ "$1" = "--complete" ]; then
echo -
echo --no-rehash
echo bash
echo fish
echo ksh
echo zsh
exit
fi
print=""
no_rehash=""
for args in "$@"

+ 5
- 0
libexec/rbenv-versions Wyświetl plik

@ -9,8 +9,13 @@ set -e
unset bare
unset skip_aliases
# Provide rbenv completions
for arg; do
case "$arg" in
--complete )
echo --bare
echo --skip-aliases
exit ;;
--bare ) bare=1 ;;
--skip-aliases ) skip_aliases=1 ;;
* )

Ładowanie…
Anuluj
Zapisz