config/shell: slight adjustments

This commit is contained in:
xeruf 2022-10-04 09:24:23 +02:00
parent 64936470f2
commit 751f421d59
3 changed files with 3 additions and 3 deletions

View File

@ -102,7 +102,7 @@ pathadd() {
# ZSH completion and stuff {{{1
alias rs="reset && source $HOME/.zshenv && exec $SHELL"
alias hist='print -z $(history | grep -v "killm " | tac | fzf --tiebreak=index --bind='"'"'del:execute(sed "\;$(echo {4..})$d" -i.bak $HISTFILE)'"'"' | sed "s|^ \+||" | cut -d" " -f5-)'
alias hist='print -z $(history | grep -v -e "killm " -e "netkeeper " | tac | fzf --tiebreak=index --bind='"'"'del:execute(sed "\;$(echo {4..})$d" -i.bak $HISTFILE)'"'"' | sed "s|^ \+||" | cut -d" " -f5-)'
alias es='edit-shell'
alias ec='edit-config'

View File

@ -40,7 +40,7 @@ case "$cmd" in
showinfo zsh $(test "$last" != zsh && echo "$last") ||
LESS="$LESS +/^ *$last *\\[" man zshall;;
(*) showinfo "$@" || man "$@" || return=$?
if test "$return" -gt 0 && which "$cmd" >/dev/null
if test "${return:-0}" -gt 0 && which "$cmd" >/dev/null
then { unbuffer "$@" --help || { test $? == 1 && "$@" -help; } || { test $? == 1 && "$@" -h; }; } 2>&1 | $paginate
return=$?
fi;;

View File

@ -7,6 +7,6 @@ if test -e "$JOURNAL"; then
done
jrnl intentions "$intention"
sudo nft flush chain inet filter outall
sudo nft add rule inet filter outall meta hour "$(date +%H:%M)"-"$(date +%H:%M --date="${1:-5}min")" accept
sudo nft add rule inet filter outall meta hour "$(date +%H:%M)"-"$(date +%H:%M --date="${1:-10}min")" accept
#expr \( "$1" \> 40 \) \* 10 \| "$1"
fi