Changes
This commit is contained in:
parent
ff88d697e0
commit
225cdab7ec
18
shells/zshrc
18
shells/zshrc
@ -51,6 +51,7 @@ asroot(){
|
|||||||
xauth extract $TEMPFILE $DISPLAY
|
xauth extract $TEMPFILE $DISPLAY
|
||||||
sudo zsh -c "xauth merge $TEMPFILE;(srm $TEMPFILE||rm $TEMPFILE)&'$@';"
|
sudo zsh -c "xauth merge $TEMPFILE;(srm $TEMPFILE||rm $TEMPFILE)&'$@';"
|
||||||
}
|
}
|
||||||
|
# De-symlink
|
||||||
dsl() {
|
dsl() {
|
||||||
while (( $# > 0 )); do
|
while (( $# > 0 )); do
|
||||||
readlink $1 2>&1 >/dev/null && mv $(readlink $1) $1
|
readlink $1 2>&1 >/dev/null && mv $(readlink $1) $1
|
||||||
@ -58,12 +59,14 @@ dsl() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
dedir(){
|
dedir(){
|
||||||
mv "$1"/* .
|
chronic rmdir "$1" -v && return
|
||||||
rmdir "$1"
|
name=$(uuidgen)
|
||||||
if (( !? != 0 )); then
|
# Move it to a random name without clobbering, this prevents things like
|
||||||
mv "$1"/.* .
|
# files/files
|
||||||
fi
|
# From erroring because you can't move files/files to .
|
||||||
rmdir "$1"
|
chronic mv -n "$1" "$name" || return 5
|
||||||
|
chronic mv "$name"/*(D) .
|
||||||
|
chronic rmdir -v "$name"
|
||||||
}
|
}
|
||||||
alias afci='git x ./autoformat.sh;git add --all;git commit -m "Autoformatted"'
|
alias afci='git x ./autoformat.sh;git add --all;git commit -m "Autoformatted"'
|
||||||
alias cpatch='diff -crB'
|
alias cpatch='diff -crB'
|
||||||
@ -110,7 +113,7 @@ alias skim="(head -5; tail -5) <"
|
|||||||
alias cp='rsync --partial -ha --info=progress2 "$@"'
|
alias cp='rsync --partial -ha --info=progress2 "$@"'
|
||||||
mv() { /bin/mv -v "$@" }
|
mv() { /bin/mv -v "$@" }
|
||||||
m() { mv "$@" }
|
m() { mv "$@" }
|
||||||
#compdef _cp c cfat m mv cp
|
compdef _cp c cfat m mv cp
|
||||||
alias dt='date "+%F %T"'
|
alias dt='date "+%F %T"'
|
||||||
alias awake='disphost; while true; do xdotool mousemove 0 0; sleep 60; done'
|
alias awake='disphost; while true; do xdotool mousemove 0 0; sleep 60; done'
|
||||||
alias adk='/home/stonewareslord/Applications/adk/bin/studio.sh & disown'
|
alias adk='/home/stonewareslord/Applications/adk/bin/studio.sh & disown'
|
||||||
@ -358,7 +361,6 @@ compdefas () {
|
|||||||
}
|
}
|
||||||
compdefas ssh tsh
|
compdefas ssh tsh
|
||||||
compdefas mv m mv
|
compdefas mv m mv
|
||||||
compdefas rsync c cp cfat
|
|
||||||
mcl(){
|
mcl(){
|
||||||
mkdir -p $1
|
mkdir -p $1
|
||||||
cd $1
|
cd $1
|
||||||
|
Loading…
Reference in New Issue
Block a user