Better upgrade, restore compdef
This commit is contained in:
parent
f40f8d99bb
commit
92afaec853
32
shells/zshrc
32
shells/zshrc
@ -41,7 +41,7 @@ sv () {
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
#compdef _services sv
|
compdef _services sv
|
||||||
# Run gui application as root by copying xauth credentials
|
# Run gui application as root by copying xauth credentials
|
||||||
asroot(){
|
asroot(){
|
||||||
# Use temporary file for added security
|
# Use temporary file for added security
|
||||||
@ -103,13 +103,20 @@ else
|
|||||||
fi
|
fi
|
||||||
if test -f /etc/gentoo-release; then
|
if test -f /etc/gentoo-release; then
|
||||||
# Gentoo
|
# Gentoo
|
||||||
alias etup='sudo etc-update'
|
alias etup='sudo etc-update'
|
||||||
ins(){
|
ins(){
|
||||||
echo "args: $*"
|
# Sudo echo so we have immediate results on weather sudo worked
|
||||||
|
sudo echo "Args: $*"
|
||||||
# Beep, verbose, ask
|
# Beep, verbose, ask
|
||||||
sudo zsh -c "emerge --autounmask-write -Ava $*"
|
sudo zsh -c "emerge --autounmask-write -Ava $*"
|
||||||
echo "\a"
|
echo "\a"
|
||||||
}
|
}
|
||||||
|
upgrade(){
|
||||||
|
# Sudo echo so we have immediate results on weather sudo worked
|
||||||
|
sudo echo "Args: $*"
|
||||||
|
sudo emerge --update --newuse --with-bdeps=y --deep --verbose --tree --keep-going=y --verbose-conflicts --alert --ask $* @world
|
||||||
|
echo "\\a"
|
||||||
|
}
|
||||||
# For emerging with absolute paths
|
# For emerging with absolute paths
|
||||||
em(){
|
em(){
|
||||||
# Beep, verbose, ask
|
# Beep, verbose, ask
|
||||||
@ -138,7 +145,6 @@ alias etup='sudo etc-update'
|
|||||||
cd ->/dev/null
|
cd ->/dev/null
|
||||||
echo '\a'
|
echo '\a'
|
||||||
}
|
}
|
||||||
alias upgrade='sudo emerge --update --newuse --with-bdeps=y --deep --verbose --tree --keep-going=y --verbose-conflicts --alert --ask @world;echo \\a'
|
|
||||||
elif test -f /etc/lsb-release; then
|
elif test -f /etc/lsb-release; then
|
||||||
# Ubuntu
|
# Ubuntu
|
||||||
alias install='sudo apt-get --show-progress install'
|
alias install='sudo apt-get --show-progress install'
|
||||||
@ -183,7 +189,7 @@ fixsh(){
|
|||||||
}
|
}
|
||||||
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
|
||||||
paste() {
|
paste() {
|
||||||
NAME="-d title=Command run at $(date '+%d/%h/%y %H:%M:%S') on $(hostname)"
|
NAME="-d title=Command run at $(date '+%d/%h/%y %H:%M:%S') on $(hostname)"
|
||||||
if [[ ! -z "$1" ]]; then
|
if [[ ! -z "$1" ]]; then
|
||||||
@ -273,14 +279,14 @@ tsh(){
|
|||||||
echo "\n\n\n\n\n\n\n\n\n\nSESSION CLOSED\n\n\n\n\n\n\n\n\n\n"
|
echo "\n\n\n\n\n\n\n\n\n\nSESSION CLOSED\n\n\n\n\n\n\n\n\n\n"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
#compdefas () {
|
compdefas () {
|
||||||
# local a
|
local a
|
||||||
# a="$1"
|
a="$1"
|
||||||
# shift
|
shift
|
||||||
# #compdef "$_comps[$a]" "${(@)*}=$a"
|
compdef "$_comps[$a]" "${(@)*}=$a"
|
||||||
#}
|
}
|
||||||
#compdefas ssh tsh
|
compdefas ssh tsh
|
||||||
#compdefas mv m mv
|
compdefas mv m mv
|
||||||
mcl(){
|
mcl(){
|
||||||
mkdir -p $1
|
mkdir -p $1
|
||||||
cd $1
|
cd $1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user