zellij icon indicating copy to clipboard operation
zellij copied to clipboard

Enhance Session Selection with Prefix Matching and Fuzzy Finder

Open frolvanya opened this issue 1 year ago • 2 comments

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

frolvanya avatar May 24 '24 16:05 frolvanya

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/

imsnif avatar May 24 '24 17:05 imsnif

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)'

DerTimonius avatar Aug 17 '24 16:08 DerTimonius