1
0
Fork 0
zsh/hybris.zsh

48 lines
1.7 KiB
Bash
Raw Normal View History

2020-04-29 11:59:05 +02:00
# keychain
zstyle :omz:plugins:keychain agents gpg,ssh
zstyle :omz:plugins:keychain identities id_rsa id_ed25519 D79CA887
2020-04-29 11:59:05 +02:00
zstyle :omz:plugins:keychain options --quiet
# bip at command end, resize font
function precmd() {
echo -n -e "\a"
}
2016-02-24 00:18:23 +01:00
2022-07-18 16:39:24 +02:00
# history file
2016-02-24 00:18:23 +01:00
unsetopt share_history
2022-07-18 16:39:24 +02:00
setopt INC_APPEND_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
HISTSIZE=500000
SAVEHIST=500000
2016-02-24 00:18:23 +01:00
# Disable reserved word foreach
disable -r foreach
2016-02-24 00:18:23 +01:00
# Everyday aliases
2019-03-25 11:52:35 +01:00
catwhich() {echo "\e[35mPath: $(which $1)\n\e[39m"; cat $(which $1)}
2019-03-26 16:43:07 +01:00
dontknow() {echo -n "¯\\_(ツ)_/¯" | xclip}
2019-03-07 14:44:39 +01:00
e() {emacsclient -n $@ > /dev/null 2>&1}
2021-06-08 11:21:44 +02:00
tramp() {emacsclient -n $(for x in $@; do echo /root@$x:README; done) > /dev/null 2>&1}
2019-03-26 16:51:50 +01:00
fd() {fdfind -H -I -L $@}
2021-08-31 17:38:21 +02:00
unifi-balance() {ssh ubnt@192.168.42.1 /opt/vyatta/bin/vyatta-op-cmd-wrapper 'show load-balance watchdog' 2> /dev/null}
2019-03-07 14:44:39 +01:00
j() {if [ $# -eq 0 ]; then marks; else jump $@; fi}
loop() {while [ 1 ]; do sh -c "$@"; done}
open_ports() {if [ $# -eq 1 ] && [ $1 = "public" ]; then sudo netstat -tulpen 2> /dev/null | grep "LISTEN" | grep -v "127.0.0.1"; else sudo netstat -tulpen 2> /dev/null | grep "LISTEN"; fi}
2019-03-22 10:28:28 +01:00
r() {if [ $# -gt 0 ]; then for h in $@; do ssh root@$h; done; else sudo su -; fi}
2019-12-09 17:11:19 +01:00
ra() {if [ $# -gt 0 ]; then for h in $@; do ssh -A root@$h; done; else sudo su -; fi}
2017-03-29 18:03:20 +02:00
# Usefull bindings
bindkey "^[Od" backward-word
bindkey "^[Oc" forward-word
2016-02-24 00:18:23 +01:00
# Some exports
export EDITOR=emacsclient
export LESS=-cex2MRX
export LESSOPEN='|~/.lessfilter %s'
export LOGCHECK=60
export READNULLCMD=${PAGER:-/usr/bin/pager}
export WATCH=all
export WATCHFMT="%n has %a %l from %M"
2022-10-15 18:03:02 +02:00
export ROBESPIERRE=/home/hybris/dev/robespierre/infra
export PATH=$ROBESPIERRE/bin:$HOME/.scripts:$PATH