zellij
zellij copied to clipboard
Enhance Session Selection with Prefix Matching and Fuzzy Finder
Instead of typing zellij a session-name, wouldn't it be better to use zellij a se (using just the first few characters)? If there are multiple names starting with the same prefix, we could then open fzf for selection:
$ zellij ls
session-1
session-2
main
$ zellij a se
> session-1
session-2
# ideally empty matching string should result in fzf $(zellij ls)
# also, it should work only if we don't have any active sessions and we're looking to resurrect one
$ zellij a
> session-1
session-2
main
You might be interested in the welcome-screen and/or the session-manager. They have this functionality (also with filtering your fuzzy found selection in real time in a list) built-in. You can check out this screencast for more info: https://zellij.dev/tutorials/session-management/
If you already have fzf installed, you could create an alias to do something like what you suggest:
zellij attach $(zellij ls -s | fzf)
I use the following alias:
alias zat='zellij attach $(zellij ls -s | fzf)'