dotfiles

<-- duh.
Log | Files | Refs | LICENSE

commit deeb13d80708bcd1b787d8bec2e11f742af455d2
parent b63bf587e11b90355a747bac1d66fbaa9d79db0f
Author: hhvn <dev@hhvn.uk>
Date:   Mon, 18 Apr 2022 18:09:22 +0100

Cleanup after _man func in .rcrc

Diffstat:
M.rcrc | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/.rcrc b/.rcrc @@ -18,6 +18,12 @@ fn __prompt_exit_colour { } } +fn sigexit { + for (f in $manconfs) { + rm -f $f + } +} + # Backend prompt function fn __prompt { __prompt_exitcodes = $status @@ -171,9 +177,12 @@ fn w3m { fn _man { conf = '/tmp/'^$pid^'.man.conf' program = $1 { sed -E 's~HOME~'^$home^'~g' < $home/.config/man.conf > $conf + manconfs = ($manconfs $conf) shift 1 builtin $program -C $conf $* - rm $conf + for (f in $manconfs) { + rm -f $f >[2]/dev/null + } } } fn man { _man man $* }