X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=f9acadade2fb7414038b7efb6fbc797a539992b9;hb=ca61084446e48fb0703ce2a203c1bd18ceaf4dfb;hp=104907e67c76f2d4df1f737ff986a3300d9db381;hpb=989554cab0d0c59d1aab20496ba9550acd17e6e6;p=distro-setup diff --git a/brc2 b/brc2 index 104907e..f9acada 100644 --- a/brc2 +++ b/brc2 @@ -364,29 +364,30 @@ edelayon() { eqgo() { local -a array tmpstr delayon delayon=true - if grep -qFx all /etc/exim4/no-delay-eximids; then + if grep -qFx all /var/spool/exim4/gw/.no-delay-eximids; then delayon=false fi if $delayon; then - echo all >/etc/exim4/no-delay-eximids + echo all >/var/spool/exim4/gw/.no-delay-eximids fi tmpstr=$(exiqgrep -i -r.\*) mapfile -t array <<<"$tmpstr" enn -M "${array[@]}" if $delayon; then - echo >/etc/exim4/no-delay-eximids + echo >/var/spool/exim4/gw/.no-delay-eximids fi } eqgo1() { local eid eid="$(exipick -i -r.\*|h1)" - sed -n "/^all$/p;\$a $eid" /etc/exim4/no-delay-eximids + sed -n "/^all$/p;\$a $eid" /var/spool/exim4/gw/.no-delay-eximids enn -M "$eid" } +# exim -M (in namespace and without delay) ennm() { local eid for eid; do - printf "%s\n" "$eid" >>/etc/exim4/no-delay-eximids + printf "%s\n" "$eid" >>/var/spool/exim4/gw/.no-delay-eximids done enn -M "$@" } @@ -3904,7 +3905,7 @@ torshell() { } eless2() { - less /var/log/exim4/mymain + less /var/log/exim4/nondmain } @@ -4013,7 +4014,7 @@ tu() { enn() { local ecmd pid - ecmd="/usr/sbin/exim4 -C /etc/exim4/my.conf" + ecmd="/usr/sbin/exim4 -C /etc/exim4/nn-mainlog.conf" if ip a show veth1-mail &>/dev/null; then s $ecmd "$@" else @@ -4610,7 +4611,15 @@ if type -P rg &>/dev/null; then # --no-messages because of annoying errors on broken symlinks # -z = search .gz etc files # -. = search dotfiles - rg() { command rg -. -z --no-messages -L -i -M 900 --no-ignore-parent --no-ignore-vcs -g '!.git' -g '!auto-save-list' -g '!.savehist' "$@" || return $?; } + # -n --no-heading: show files and line numbers together allowing for clicking + rg() { + local path_arg + if [[ ${#@} == 1 ]]; then + path_arg=. + fi + + command rg -. -z --no-messages -Lin --no-heading -M 900 --no-ignore-parent --no-ignore-vcs -g '!.git' -g '!auto-save-list' -g '!.savehist' "$@" $path_arg || return $? + } #fails if not exist. ignore complete -r rg 2>/dev/null ||: else @@ -4619,7 +4628,10 @@ fi # rg with respecting vcs ignore files rgv() { - ret=0 + local path_arg ret=0 + if [[ ${#@} == 1 ]]; then + path_arg=. + fi # settings that are turned off for pipes, keep them on. # Found by searching for "terminal" in --help # --heading @@ -4629,9 +4641,10 @@ rgv() { # -z = search zipped files # -i = case insensitive # -M = max columns + # -n --no-heading: show files and line numbers together allowing for clicking # --no-messages because of annoying errors on broken symlinks # --no-ignore-parent because i have /a/.git which ignores almost everything under it. - command rg -n --heading -. -z --no-messages -i -M 900 --no-ignore-parent -g '!.git' -g '!auto-save-list' -g '!.savehist' "$@" || ret=$? + command rg -n --no-heading -. -z --no-messages -i -M 900 --no-ignore-parent -g '!.git' -g '!auto-save-list' -g '!.savehist' "$@" $path_arg || ret=$? return $ret }