Merge branch 'common'
This commit is contained in:
@@ -17,7 +17,7 @@ export PATH
|
||||
|
||||
export EDITOR="vim"
|
||||
export VISUAL="vim"
|
||||
export BROWSER="/usr/bin/xdg-open"
|
||||
export BROWSER="firefox"
|
||||
|
||||
export PAGER="less"
|
||||
export LESS="FRX"
|
||||
|
||||
@@ -14,3 +14,5 @@ for file in "${_zshdir}"/* ; do
|
||||
source "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
### TRANSLATIONS
|
||||
alias vim="nvim"
|
||||
|
||||
alias urxvt="urxvt256c"
|
||||
|
||||
### COMMON OPERATIONS
|
||||
alias ll='ls -AlFh'
|
||||
alias la='ls -A'
|
||||
@@ -26,8 +21,6 @@ alias calc='python3 -ic "from math import *; import cmath"'
|
||||
alias le_haxxor_1='clear && dmesg | pv -qL 20'
|
||||
alias le_haxxor_2='clear && hexdump -C /dev/urandom | pv -qlL 2'
|
||||
|
||||
alias b='cd $OLDPWD'
|
||||
|
||||
alias root='sudo -sE'
|
||||
|
||||
### USEFUL DEFAULT OPTIONS
|
||||
@@ -69,3 +62,8 @@ alias tw="task"
|
||||
alias twl="task list"
|
||||
alias twa="task add"
|
||||
alias twd="task done"
|
||||
|
||||
alias yaml2js="python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)'"
|
||||
|
||||
alias currentbranch='git rev-parse --abbrev-ref HEAD'
|
||||
alias gpush='git push origin $(currentbranch)'
|
||||
|
||||
@@ -148,6 +148,10 @@ resolvecd() {
|
||||
cd "$(readlink -f $(pwd))"
|
||||
}
|
||||
|
||||
sshmux () {
|
||||
ssh -t $@ "tmux a || tmux";
|
||||
}
|
||||
|
||||
t() {
|
||||
if [[ "$1" ]] ; then
|
||||
tmux new-session -A -s "$1"
|
||||
@@ -155,3 +159,21 @@ t() {
|
||||
tmux attach-session
|
||||
fi
|
||||
}
|
||||
|
||||
b() {
|
||||
bookmarks=${DOTFILES}/bookmarks
|
||||
bookmark="$1"
|
||||
if ! [[ "${bookmark}" ]] ; then
|
||||
printf 'Need a bookmark' >&2
|
||||
return 1
|
||||
fi
|
||||
if ! [[ -r "${bookmark}" ]] ; then
|
||||
printf 'Invalid bookmark %s' "${bookmark}" >&2
|
||||
return 1
|
||||
fi
|
||||
target="$(head -1 ${bookmark})"
|
||||
if ! [[ -e "${target}" ]] ; then
|
||||
printf 'Traget not found: %s' "${target}" >&2
|
||||
fi
|
||||
cd "$(eval ${target})"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user