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
|
||||
done
|
||||
}
|
||||
#compdef _services sv
|
||||
compdef _services sv
|
||||
# Run gui application as root by copying xauth credentials
|
||||
asroot(){
|
||||
# Use temporary file for added security
|
||||
@ -103,13 +103,20 @@ else
|
||||
fi
|
||||
if test -f /etc/gentoo-release; then
|
||||
# Gentoo
|
||||
alias etup='sudo etc-update'
|
||||
alias etup='sudo etc-update'
|
||||
ins(){
|
||||
echo "args: $*"
|
||||
# Sudo echo so we have immediate results on weather sudo worked
|
||||
sudo echo "Args: $*"
|
||||
# Beep, verbose, ask
|
||||
sudo zsh -c "emerge --autounmask-write -Ava $*"
|
||||
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
|
||||
em(){
|
||||
# Beep, verbose, ask
|
||||
@ -138,7 +145,6 @@ alias etup='sudo etc-update'
|
||||
cd ->/dev/null
|
||||
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
|
||||
# Ubuntu
|
||||
alias install='sudo apt-get --show-progress install'
|
||||
@ -183,7 +189,7 @@ fixsh(){
|
||||
}
|
||||
mv() { /bin/mv -v "$@" }
|
||||
m() { mv "$@" }
|
||||
#compdef _cp c cfat m mv cp
|
||||
compdef _cp c cfat m mv cp
|
||||
paste() {
|
||||
NAME="-d title=Command run at $(date '+%d/%h/%y %H:%M:%S') on $(hostname)"
|
||||
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"
|
||||
fi
|
||||
}
|
||||
#compdefas () {
|
||||
# local a
|
||||
# a="$1"
|
||||
# shift
|
||||
# #compdef "$_comps[$a]" "${(@)*}=$a"
|
||||
#}
|
||||
#compdefas ssh tsh
|
||||
#compdefas mv m mv
|
||||
compdefas () {
|
||||
local a
|
||||
a="$1"
|
||||
shift
|
||||
compdef "$_comps[$a]" "${(@)*}=$a"
|
||||
}
|
||||
compdefas ssh tsh
|
||||
compdefas mv m mv
|
||||
mcl(){
|
||||
mkdir -p $1
|
||||
cd $1
|
||||
|
Loading…
Reference in New Issue
Block a user