mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
List sh commands separately
This commit is contained in:
parent
aade3ad781
commit
5a4bee6eb5
1 changed files with 15 additions and 1 deletions
|
@ -1,11 +1,25 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = "--sh" ]; then
|
||||||
|
sh=1
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
|
||||||
{ for path in ${PATH//:/$'\n'}; do
|
{ for path in ${PATH//:/$'\n'}; do
|
||||||
for command in "${path}/rbenv-"*; do
|
for command in "${path}/rbenv-"*; do
|
||||||
echo "${command##*rbenv-}"
|
command="${command##*rbenv-}"
|
||||||
|
if [ -n "$sh" ]; then
|
||||||
|
if [ ${command:0:3} = "sh-" ]; then
|
||||||
|
echo ${command##sh-}
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ ${command:0:3} != "sh-" ]; then
|
||||||
|
echo $command
|
||||||
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
} | sort | uniq
|
} | sort | uniq
|
||||||
|
|
Loading…
Reference in a new issue