shopt -s extglob
# include .files when globbing, but ignore files name . and ..
# setting this also sets dotglob.
-# Note, this doesnt work in bash 4.4 anymore, for paths with
-# more than 1 directory, like a/b/.foo, since * is fixed to not match /
-export GLOBIGNORE=*/.:*/..
+export GLOBIGNORE="*/.:*/.."
# broken with bash_completion package. Saw a bug for this once. dont anymore.
# still broken in wheezy
# mail related
etail() {
- sudo tail -F /var/log/exim4/mainlog -n 50
+ tail -F /var/log/exim4/mainlog -n 200
+}
+eless() {
+ less /var/log/exim4/mainlog
}
f() {
}
r() {
- histappend -a
+ history -a # save history
exit "$@"
# i had this redir, not sure why
# exit "$@" 2>/dev/null
rlu() { # [OPTS] HOST PATH
# eg. rlu -opts frodo /testpath
# relative paths will expanded with readlink -f.
- # useful for selectively sending dirs which have been synced with unison,
- # where the path is the same on both hosts.
opts=("${@:1:$#-2}") # 1 to last -2
path="${@:$#}" # last
host="${@:$#-1:1}" # last -1
fi
}
+sgu() {
+ systemctl list-unit-files | rg "$@"
+}
-shellck() {
+sk() {
# 2086 = unquoted $var
# 2046 = unquoted $(cmd)
+ # 2068: Double quote array expansions to avoid re-splitting elements.
# i had -x as an arg, but debian testing(stretch) doesn\'t support it
- shellcheck -e 2086,2046,2068,2006,2119 "$@"
+ shellcheck -x -e 2086,2046,2068 "$@"
+ # had this before. not sure what it is 2119
}
skaraoke() {