Commit Briefs

Omar Polo

implement persistent tab history

The session file is now overloaded with the history info, that means that upon startup telescope can repopulate each tab history! The price to pay is that one can't start an old telescope with a new session file, otherwise will get a lot of fancy '<' and '>' tabs...



Omar Polo

move parse_last_session to the fs process

~/.telescope/session was parsed in the main process before dropping in the sandbox: that's no good. This moves the initialization of the ui events later in ui_main_loop and makes so that the fs process, after entering the sandbox, parses and sends the content of the last session back to the main process; when it's done the ui gets loaded and telescope is back rocking. I'm plannig to re-use the struct session_tab during the save session operation soon.


Omar Polo

adjust some comments text



Omar Polo

move declarations from telescope.h in fs.h

and while there also publish various path. It's easier and better to have all of them exported from here instead of hardcoding them in other files (such as sandbox.c)


Omar Polo

dirname fix

dirname(3) is really one of the worst part of POSIX, portability-wise. Implementors can decide to either modify the passed string or return a pointer to an internal storage. The current code fails when dirname returns a pointer to an internal storage because between the strcmp call and the mkdir we go into a recursion that can modify `path'. We can't use copy either because *some* implementation of dirname would have changed that. How to escape from this hell? Take yet another copy of the path!


Omar Polo

support xdg basedir

Use XDG-compliant paths unless ~/.telescope already exists. Provide a script to migrate to XDG-style directory for users who wish to do so.


Omar Polo

delete old (and wrong) comment

it's been a while since we're using a lockfile to protect against multiple telescope instances.


Omar Polo

sort includes


Omar Polo

ignore the crashed file if in safe_mode

During safe_mode the fs process shouldn't open or unlink the crashed_file.


Omar Polo

improve crash detection

Create a file ~/.telescope/crashed on startup and unlink it on shutdown. If it's present on startup, it means that last time we crashed. It's like the ``dirty'' bit on filesystems to guard for unproper unmounts.


Omar Polo

improve error reporting



Omar Polo

skip "." (and ".." if in /)