Histfile fallback
This commit is contained in:
parent
b0bc85b327
commit
e659f1af3d
|
@ -132,10 +132,13 @@ function merge-hist {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sync-history {
|
function sync-history {
|
||||||
scp -P 11275 'sage@sagev.space:~/histfile' "/tmp/.histfile"
|
if ! scp -P 11275 'sage@sagev.space:~/histfile' "/tmp/.histfile"; then
|
||||||
|
scp -P 11275 "$HOME/.histfile" 'sage@sagev.space:~/histfile'
|
||||||
|
return
|
||||||
|
fi
|
||||||
merge-hist "$HOME/.histfile" "/tmp/.histfile" > "/tmp/$(whoami).histfile"
|
merge-hist "$HOME/.histfile" "/tmp/.histfile" > "/tmp/$(whoami).histfile"
|
||||||
mv "/tmp/$(whoami).histfile" "$HOME/.histfile"
|
mv "/tmp/$(whoami).histfile" "$HOME/.histfile"
|
||||||
scp -P 11275 "$HOME/.histfile" "/tmp/$(whoami).histfile"
|
scp -P 11275 "$HOME/.histfile" 'sage@sagev.space:~/histfile'
|
||||||
}
|
}
|
||||||
|
|
||||||
function load-extensions {
|
function load-extensions {
|
||||||
|
|
Loading…
Reference in New Issue