Plan 9 from Bell Labs’s /n/sources/patch/applied/conswdir-restore-dirs/readme
Save and restore label and wdir on startup and exit. I tend to hop on and off remote machines quite a bit.