config/shell: lil helpers

This commit is contained in:
xeruf 2021-07-06 02:00:56 +02:00
parent ff9d52cdeb
commit a9259e3db2
3 changed files with 5 additions and 1 deletions

View File

@ -84,6 +84,8 @@ edconf() {
test "$sel" && ((echo "$sel" | cat - "$conf_cache" | head -30 >"$conf_tmp" && mv "$conf_tmp" "$conf_cache") & edit "$sel")
}
alias hist='print -z $(history | fzf --nth 4.. | tr -s " " | cut -d" " -f5-)'
CONFIG_SHELL_FUNCTIONS="${BASH_SOURCE[0]:-${(%):-%x}}"
alias r="reset && exec zsh"
edcomp() {

View File

@ -98,5 +98,7 @@ formatsong() {
s/---/ - /;
s/^[0-9]\{6\}_//;
s/ / /g;
s/_\././g;
s/_/ /g;
s/\(\w\)+\(\w\)/\1 \2/g' -
}

View File

@ -40,7 +40,7 @@ export CCACHE_DIR="$XDG_CACHE_HOME"/ccache
# environment
export IGNOREDIRS=".sync,.stfolder,.git,out,build,dev"
export EDITOR=/usr/bin/nvim
export LESS='--RAW-CONTROL-CHARS --ignore-case --incsearch --jump-target=5'
export LESS='--RAW-CONTROL-CHARS --ignore-case --incsearch --LONG-PROMPT --jump-target=5'
# red stderr
test -f "/usr/lib/libstderred.so" && export LD_PRELOAD="/usr/lib/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}"
# software config