etail2() {
tail -F /var/log/exim4/mymain -n 200 "$@"
}
-ccomp tail etail etail2
+# shortcut
+ta() {
+ tail -F "$@"
+}
+ccomp tail etail etail2 ta
# ran into this online, trying it out
detach() {
args+=" -c"
fi
fi
- if [[ $EMACSDIR ]]; then
-
- # todo: we don't have to alter HOME since emacs 29+, we can set
- # user-emacs-directory with the flag --init-directory
-
- # Alter the path here, otherwise the nfs mount gets triggered on the
- # first path lookup when emacs is not being used.
- # shellcheck disable=SC2098 disable=SC2097 # false positive
- PATH="$EMACSDIR/lib-src:$EMACSDIR/src:$PATH" EHOME=$HOME HOME=$EMACSDIR m emacsclient -a "" $args "$@"
+ if $gdb; then
+ # due to a bug, we cant debug from the start unless we get a new gdb
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=24454
+ # m gdb -ex="set follow-fork-mode child" -ex=r -ex=quit --args emacs --daemon
+ m emacsclient -a "" $args "$@"
+ sleep 1
+ cd "/a/opt/emacs-$(distro-name)$(distro-num)"
+ s gdb -p "$(pgrep -f 'emacs --daemon')" -ex c
+ cd -
else
- if $gdb; then
- # due to a bug, we cant debug from the start unless we get a new gdb
- # https://sourceware.org/bugzilla/show_bug.cgi?id=24454
- # m gdb -ex="set follow-fork-mode child" -ex=r -ex=quit --args emacs --daemon
- m emacsclient -a "" $args "$@"
- sleep 1
- cd "/a/opt/emacs-$(distro-name)$(distro-num)"
- s gdb -p "$(pgrep -f 'emacs --daemon')" -ex c
- cd -
- else
- m emacsclient -a "" $args "$@"
- fi
+ m emacsclient -a "" $args "$@"
fi
}