Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to hide folder from the results #222

Open
elianortega opened this issue Feb 5, 2025 · 1 comment
Open

How to hide folder from the results #222

elianortega opened this issue Feb 5, 2025 · 1 comment

Comments

@elianortega
Copy link

I'm kind of new to the whole tmux and terminal only world, I just started using sesh and wanted to know if there is a way that I can hide some folders from the results list by appending something to the command.

In my tmux.conf I have:

bind-key "T" run-shell "sesh connect "$(
sesh list --icons | fzf-tmux -p 80%,70%
--no-sort --ansi --border-label ' sesh ' --prompt '⚡ '
--header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find'
--bind 'tab:down,btab:up'
--bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list --icons)'
--bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t --icons)'
--bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --icons)'
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --icons)'
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)'
--bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡ )+reload(sesh list --icons)'
--preview-window 'right:55%'
--preview 'sesh preview {}'
)""

Which works perfect on my day to day, but sometimes I do occasional twitch streams and want to be able to hide the Work/ folder from the results list.

Any recommendation on how to achieve this?

@joshmedeski
Copy link
Owner

joshmedeski commented Feb 5, 2025

Good idea, the most simple solution that works today is to pipe your results through grep before passing it to fzf.

It would look something like this:

sesh list | grep -v '~/Work' | fzf

Note

-v flag is inverts your selection, so this is basically matching all results that do NOT match ~/Work

Hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants