config/shell: script fixes & add stat to b

This commit is contained in:
xerus2000 2020-11-30 22:13:43 +01:00
parent 9be43b4b2e
commit dadda9725f
4 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,7 @@
which pacman >/dev/null || return 0 which pacman >/dev/null || return 0
alias dragon='dragon-drag-and-drop'
# Arch aliases # Arch aliases
alias pac='noglob sudo pacman' alias pac='noglob sudo pacman'
alias pacs='pac -Syu --needed' alias pacs='pac -Syu --needed'

View File

@ -15,7 +15,7 @@ which lsb_release >/dev/null && export DIST=$(lsb_release --id | cut -d' ' -f2)
alias info='info --vi-keys' alias info='info --vi-keys'
unalias rd unalias rd
rd() { rd() {
test -d "$1" && find "$1" -type d -empty -delete || rm "$@" test -d "$1" && find "$1" -type d -empty -printf "Removing %p\n" -delete || rm "$@"
} }
rr() { mv "$@" /tmp } rr() { mv "$@" /tmp }

View File

@ -3,8 +3,9 @@
for last; do true; done for last; do true; done
last=${last:-.} last=${last:-.}
file "$last" | grep -v --color=never directory file "$last" | grep -v --color=never directory
stat -c 'Permissions: %A, Created: %.10w, Modified %.10y, Size: %s' "${@:-$last}"
case "$(file --dereference --mime "$last")" in case "$(file --dereference --mime "$last")" in
*inode/directory*) ls -l --color=auto --human-readable --group-directories-first --file-type --dereference-command-line --all --reverse "$@";; *inode/directory*) ls -l --color=auto --human-readable --group-directories-first --file-type --dereference-command-line --almost-all "$@";;
*binary) ;; *binary) ;;
*) $(test -f "$last" -a ! -r "$last") bat --style header "$@";; *) $(test -f "$last" -a ! -r "$last") bat --style header "$@";;
esac esac

View File

@ -31,7 +31,7 @@ export PASSWORD_STORE_ENABLE_EXTENSIONS="true"
export FZF_DEFAULT_OPTS='--select-1 --exit-0 --tiebreak=end,length --history=/var/tmp/fzf-history --ansi --bind="alt-enter:execute(test -O {} && $EDITOR {} || sudoedit {}),del:execute(gio trash {}),change:top,left-click:execute(xdg-open {})"' export FZF_DEFAULT_OPTS='--select-1 --exit-0 --tiebreak=end,length --history=/var/tmp/fzf-history --ansi --bind="alt-enter:execute(test -O {} && $EDITOR {} || sudoedit {}),del:execute(gio trash {}),change:top,left-click:execute(xdg-open {})"'
FD_BASE="fd --hidden --color=always --no-ignore-vcs" FD_BASE="fd --hidden --color=always --no-ignore-vcs"
export FZF_DEFAULT_COMMAND="$FD_BASE --type file" export FZF_DEFAULT_COMMAND="$FD_BASE --type file"
export FZF_CTRL_T_COMMAND="$FD_BASE -d 4" export FZF_CTRL_T_COMMAND="$FD_BASE -d 7"
# ctest # ctest
export CTEST_PROGRESS_OUTPUT=1 export CTEST_PROGRESS_OUTPUT=1
export CTEST_OUTPUT_ON_FAILURE=1 export CTEST_OUTPUT_ON_FAILURE=1