fixed cp again and made some changes
This commit is contained in:
parent
1b216d4cfb
commit
d27b0073db
1 changed files with 8 additions and 24 deletions
26
.zshrc
26
.zshrc
|
@ -313,7 +313,10 @@ drweb() {
|
||||||
git clone --depth=1 "https://github.com/$1"
|
git clone --depth=1 "https://github.com/$1"
|
||||||
}
|
}
|
||||||
gck() {
|
gck() {
|
||||||
git clone --depth=1 "https://git.k4li.de/$1"
|
git clone --recurse-submodules --depth=1 "https://git.k4li.de/$1"
|
||||||
|
}
|
||||||
|
gcs() {
|
||||||
|
git clone --recurse-submodules --depth=1 "git@git.k4li.de:$1"
|
||||||
}
|
}
|
||||||
alias gd="git diff"
|
alias gd="git diff"
|
||||||
alias ga="gd $1 && git add"
|
alias ga="gd $1 && git add"
|
||||||
|
@ -392,32 +395,14 @@ _coding_() {
|
||||||
npm run "$env" -- --host="$(get_ip)" --port="$port"
|
npm run "$env" -- --host="$(get_ip)" --port="$port"
|
||||||
|
|
||||||
}
|
}
|
||||||
# alias npmrun='npm run "$1" -- --host=$(get_ip) --port=8001'
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# ─< rsync >────────────────────────────────────────────────────────────────────────────────
|
# ─< rsync >────────────────────────────────────────────────────────────────────────────────
|
||||||
_rsync_() {
|
|
||||||
_rrsync() {
|
|
||||||
if command_exists find; then
|
|
||||||
numbers=0
|
|
||||||
for source in "${@:1:$#-1}"; do
|
|
||||||
numbers=$(($numbers + $(find "$source" -type f | wc -l)))
|
|
||||||
done
|
|
||||||
destination="${@: -1}"
|
|
||||||
|
|
||||||
rsync -avP --info=progress2 "${@:1:$#-1}" "$destination" | pv -lpes $numbers
|
|
||||||
else
|
|
||||||
echo_error "-- We could not find 'find'. Please install 'find' to enable the progress bar. (hit 'CTRL + C' to exit now) --"
|
|
||||||
sleep 5
|
|
||||||
rsync -avP --info=progress2 "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
if command_exists rsync; then
|
if command_exists rsync; then
|
||||||
alias cp="_rrsync"
|
|
||||||
alias scp="rsync -avP"
|
alias scp="rsync -avP"
|
||||||
|
alias cp="scp"
|
||||||
fi
|
fi
|
||||||
}
|
|
||||||
|
|
||||||
get_packager() {
|
get_packager() {
|
||||||
search=""
|
search=""
|
||||||
|
@ -506,7 +491,6 @@ main(){
|
||||||
_init
|
_init
|
||||||
_alias
|
_alias
|
||||||
_coding_
|
_coding_
|
||||||
_rsync_
|
|
||||||
}
|
}
|
||||||
if check_root; then
|
if check_root; then
|
||||||
main
|
main
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue