Ensure up-to-date local history file before sync
This commit is contained in:
parent
4a529f742d
commit
3e26791ea3
|
@ -140,9 +140,11 @@ function sync-history {
|
||||||
scp -P 11275 "$HOME/.histfile" 'sage@sagev.space:~/histfile'
|
scp -P 11275 "$HOME/.histfile" 'sage@sagev.space:~/histfile'
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
fc -W # Write to history file
|
||||||
merge-hist "$HOME/.histfile" "$HOME/.tmp/.histfile" > "$HOME/.tmp/$(whoami).histfile"
|
merge-hist "$HOME/.histfile" "$HOME/.tmp/.histfile" > "$HOME/.tmp/$(whoami).histfile"
|
||||||
mv "$HOME/.tmp/$(whoami).histfile" "$HOME/.histfile"
|
mv "$HOME/.tmp/$(whoami).histfile" "$HOME/.histfile"
|
||||||
scp -P 11275 "$HOME/.histfile" 'sage@sagev.space:~/histfile'
|
scp -P 11275 "$HOME/.histfile" 'sage@sagev.space:~/histfile'
|
||||||
|
fc -R # Read from new history file
|
||||||
}
|
}
|
||||||
|
|
||||||
function load-extensions {
|
function load-extensions {
|
||||||
|
|
Loading…
Reference in New Issue