config/shell: adjust to debian
This commit is contained in:
parent
156ff8784d
commit
5834f62a55
|
@ -1,6 +1,7 @@
|
|||
which apt >/dev/null || return 0
|
||||
|
||||
which fd >/dev/null || alias fd='fdfind'
|
||||
which bat >/dev/null || alias bat='batcat'
|
||||
|
||||
addalternative() {
|
||||
sudo update-alternatives --install /usr/bin/$1 $1 "$(which "$1$2")" 1
|
||||
|
|
|
@ -14,7 +14,7 @@ tput setaf 4 && $elevate file -E "$last" | ( grep -v --color=never 'directory$'
|
|||
case "$($elevate file --dereference --mime "$last")" in
|
||||
*inode/directory*) tput sgr0 && $(test -x "$last" || echo "sudo") ls -l --color=always --human-readable --group-directories-first --file-type --dereference-command-line --all "$@" | less -XF;;
|
||||
*binary) ;;
|
||||
*) $elevate bat --style header --force-colorization "$@" | less -XF
|
||||
*) $elevate bat --style header --color always "$@" | less -XF
|
||||
tput setaf 3 && $elevate stat --format '%A size %sB, birth: %.10w mod %.10y' "$last"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
alias dedup='awk '"'"'!a[$0]++'"'"
|
||||
|
||||
listconf() {
|
||||
{ cat "$conf_cache";
|
||||
fd --hidden --type file --size -1m --max-depth 1 . ~;
|
||||
find "${XDG_CONFIG_HOME:-$HOME/.config}" /etc /var/lib/postgres -maxdepth 4 -follow -type f -readable -exec grep -lI '' {} + 2>/dev/null; } | dedup
|
||||
{ cat "$conf_cache";
|
||||
$(which fd || echo fdfind) --hidden --type file --size -1m --max-depth 1 . ~;
|
||||
find "${XDG_CONFIG_HOME:-$HOME/.config}" /etc /var/lib/postgres /var/lib/pleroma -maxdepth 4 -follow -type f -readable -exec grep -lI '' {} + 2>/dev/null; } | dedup
|
||||
}
|
||||
|
||||
conf_cache_dir="${XDG_CACHE_HOME:-$HOME/.cache}/edconf"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
set -o pipefail
|
||||
upCount=$(git rev-list --count HEAD...@{push} 2>/dev/null)
|
||||
count=$(expr ${upCount:-0} + 3 \& ${upCount:-0} \> 3 \| 6)
|
||||
|
|
|
@ -46,7 +46,7 @@ export CONFIG_SHELLS="$XDG_CONFIG_HOME/shell"
|
|||
|
||||
# environment
|
||||
which nvim >/dev/null && export EDITOR='nvim' || export EDITOR='vim'
|
||||
export LESS='--RAW-CONTROL-CHARS --ignore-case --incsearch --LONG-PROMPT --jump-target=5'
|
||||
export LESS="--RAW-CONTROL-CHARS --ignore-case --LONG-PROMPT --jump-target=5 $(test $(less --version | head -1 | cut -f2 -d' ') -ge 590 && echo --incsearch)"
|
||||
export IGNOREDIRS="-x dev -x .sync -x .stfolder -x .git -x .gradle -x .idea -x out -x *build -x dist_newstyle -x generated -x cache -x node_modules"
|
||||
# red stderr
|
||||
test -f "/usr/lib/libstderred.so" && export LD_PRELOAD="/usr/lib/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}"
|
||||
|
|
Loading…
Reference in New Issue