config/shell: improve wh highlighting
This commit is contained in:
parent
0838f23d8b
commit
a5f22fd72e
|
@ -50,7 +50,7 @@ rd() {
|
||||||
wh() {
|
wh() {
|
||||||
res=$(which "$@")
|
res=$(which "$@")
|
||||||
if expr "$res" : "${@:$#}: aliased to" >/dev/null
|
if expr "$res" : "${@:$#}: aliased to" >/dev/null
|
||||||
then echo "$res" && wh $(expr "$res" : "${@:$#}: aliased to ${@:$#} " >/dev/null && echo "-p") $(echo "$res" | cut -d' ' -f4)
|
then echo "$res" | bat --style=plain --language=sh && wh $(expr "$res" : "${@:$#}: aliased to ${@:$#} " >/dev/null && echo "-p") $(echo "$res" | cut -d' ' -f4)
|
||||||
# use command which for other shells
|
# use command which for other shells
|
||||||
else test -r "$res" && b --style=header "$res" || echo "$res" | bat --style=plain --language=sh
|
else test -r "$res" && b --style=header "$res" || echo "$res" | bat --style=plain --language=sh
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Clones from resolving the arguments and switches into the new directory
|
# Clones from resolving the arguments and switches into the new directory
|
||||||
|
set -e
|
||||||
remote=$(git-repo "$@")
|
remote=$(git-repo "$@")
|
||||||
echo "Cloning $remote"
|
echo "Cloning $remote"
|
||||||
git clone $remote ${@:4} --recurse-submodules || return $?
|
git clone $remote ${@:4} --recurse-submodules
|
||||||
cd "$(test $4 && echo $4 || basename ${remote%.git})"
|
cd "$(test $4 && echo $4 || basename ${remote%.git})"
|
||||||
|
|
Loading…
Reference in New Issue