Fussy match `load-session`
leesei opened this issue · comments
If we match the string with available sessions and only one match is found, we can just load the layout.
$ tmuxifier ls
projectA
projectB
wip@server
$ tmuxifier s B # projectB is loaded
$ tmuxifier s wip # wip@server is loaded
$ tmuxifier s project # error
"project" may mean one of the following:
projectA
projectB
Not a bad idea. It would need to play nice with the ability to load layout files from the working directory, but that shouldn't be difficult :)
Well, I've been trying out fzf: A command-line fuzzy finder and it can support the feature I wanted.
# on CLI
tmuxifier s $(tmuxifier ls | fzf)
# as function (in `.bashrc`)
tmfls() {
session=$(tmuxifier ls | fzf)
[ ! -z $session ] && tmuxifier s $session
}
Shall we add these to README
?