treyhunner/tmuxstart — pull request #12 by farfanoide (2014-06-01 01:21:24+00:00)
Title: Adds hability to have local/global session files

This is a first draft of what local sessions could look like.
They could be distributed with projects and version
controlled. They could load up entire project's environment
regardless of the machine in which they are being loaded.

Loading of sessions now has priority, tmuxstart will now search
firstly on the current folder for a session file, if not found, it'll
keep searching as it used to. if no session file is found neither
locally, nor in $TMUXSTART_DIR, it'll create a new session as it always
did.
Local sessions could also be accessed globally in order to keep working
projects at hand.

This first implementation considers all symlinks in $TMUXSTART_DIR as
local sessions. Before loading a local session, tmxustart wil cd into
its directory.
this could go hand in hand with a -c argument
(see https://github.com/treyhunner/tmuxstart/pull/11) which would
symlink the local session file to make it available globally.

I believe this could be done even more wisely by dividing
$TMUXSTART_DIR into 3 folders, one for global sessions, one for the
local ones, and one for examples, but i leave that up for discussion.

Some considerations here would be if session files should have
extensions. this would help when loading or symlinking them.