config.fish: Clear home tmp directory occasionally.
This commit is contained in:
parent
f6a0403970
commit
b599d93393
|
@ -63,7 +63,9 @@ if status --is-interactive
|
||||||
alias g="git"
|
alias g="git"
|
||||||
|
|
||||||
mkdir -p ~/.local
|
mkdir -p ~/.local
|
||||||
if [ (expr (date '+%s') - (cat "$HOME/.local/last_shell" 2>/dev/null || echo 0)) -gt "28800" ]
|
set time_diff (expr (date '+%s') - (cat "$HOME/.local/last_shell" 2>/dev/null || echo 0))
|
||||||
|
if [ "$time_diff" -gt "28800" ]
|
||||||
|
[ -d "$HOME/tmp" ] && rm -rf "$HOME/tmp/*"
|
||||||
timeout 5 git sit && date '+%s' > "$HOME/.local/last_shell"
|
timeout 5 git sit && date '+%s' > "$HOME/.local/last_shell"
|
||||||
echo ""
|
echo ""
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue