used to two spaces
This commit is contained in:
36
zsh/.zshrc
36
zsh/.zshrc
@@ -88,18 +88,34 @@ sshl() {
|
|||||||
ssh -N -L ${1}:localhost:${2} $3
|
ssh -N -L ${1}:localhost:${2} $3
|
||||||
}
|
}
|
||||||
|
|
||||||
toolbox() {
|
#toolbox() {
|
||||||
if [[ $@ =~ (enter) && ! $@ =~ (-r|--release|-d|--distro) ]]; then
|
# if [[ $@ =~ (enter) && ! $@ =~ (-r|--release|-d|--distro) ]]; then
|
||||||
|
#
|
||||||
|
# CONTAINER=$(sed -E -e 's/enter|--container|-c|toolbox|\t|\n|\s//g' <<< $@)
|
||||||
|
#
|
||||||
|
# if [[ ! -z ${CONTAINER} && ${CONTAINER} =~ "^[a-zA-Z0-9-]{1,15}$" ]]; then
|
||||||
|
# command toolbox --container ${CONTAINER} run sudo hostname ${CONTAINER}
|
||||||
|
# command toolbox enter ${CONTAINER}
|
||||||
|
# else
|
||||||
|
# command toolbox enter
|
||||||
|
# fi
|
||||||
|
# else
|
||||||
|
# command toolbox $@
|
||||||
|
# fi
|
||||||
|
#}
|
||||||
|
|
||||||
CONTAINER=$(sed -E -e 's/enter|--container|-c|toolbox|\t|\n|\s//g' <<< $@)
|
dupfind() {
|
||||||
|
if [ $# -lt 1 ]; then
|
||||||
if [[ ! -z ${CONTAINER} && ${CONTAINER} =~ "^[a-zA-Z0-9-]{1,15}$" ]]; then
|
echo "Usage: $0 THREAD_COUNT [directory] ..." > /dev/stderr
|
||||||
command toolbox --container ${CONTAINER} run sudo hostname ${CONTAINER}
|
|
||||||
command toolbox enter ${CONTAINER}
|
|
||||||
else
|
|
||||||
command toolbox enter
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! [[ "$1" =~ ^[0-9]+$ ]]; then
|
||||||
|
echo "THREAD_COUNT needs to be an integer." > /dev/stderr
|
||||||
else
|
else
|
||||||
command toolbox $@
|
if [ $# -lt 2 ]; then
|
||||||
|
find . ! -empty -type f -print0 | xargs -0 -n1 -P${1} md5sum | sort | uniq -w32 -dD
|
||||||
|
else
|
||||||
|
find ${@:2:128} ! -empty -type f -print0 | xargs -0 -n1 -P${1} md5sum | sort | uniq -w32 -dD
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user