commit 8ead9fdc785f782d685e1efc126419f129c31a77
parent 9318876bf1926d32103236bb9cfc52d6617dd54c
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Tue, 25 Feb 2020 13:28:46 +0100
shell functions and aliases update
Former-commit-id: 2d4ac9508b5fa3123ffe45cafb35263e77913490
Diffstat:
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/shell/aliases b/shell/aliases
@@ -13,6 +13,7 @@ alias jobs="jobs -l"
alias htop='sudo htop' # Run htop as root by default
alias g='git' # Make git easier to type
alias wheredef='type -a' # Where is a function defined?
+alias rsync="rsync -avhP" # Recurse and preserve almost everything, verbose, human-readable sizes, partial & progress
alias j='joplin'
alias tree="tree -CAFa -I 'CVS|*.*.package|.svn|.git|node_modules' --dirsfirst" # Colorize, ANSI graphics hack, indicate ft with appendices, print all files, ignore certain patterns, list dirs first
alias lsblk="lsblk -o NAME,LABEL,PARTLABEL,TYPE,FSTYPE,SIZE,MOUNTPOINT,STATE" # The columns I want to see in lsblk
diff --git a/shell/functions b/shell/functions
@@ -75,6 +75,10 @@ if command -v osascript &> /dev/null; then
}
fi
+if command -v qlmanage &> /dev/null; then
+ qlf() { qlmanage -p "$@" &> /dev/null; }
+fi
+
# fzf-reliant functions
if [ -f ~/.fzf.zsh ] || [ -f ~/.fzf.bash ]; then
export FZF_DEFAULT_OPTS="--preview-window right:100:hidden:wrap --bind '?:toggle-preview' --preview='(bat --style=numbers --color=always {} || cat {}) 2>/dev/null | head -500'"