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

Feature: add user filter option to filter out any user's temporary/background sessions #26

Open
poetaman opened this issue Sep 17, 2021 · 0 comments

Comments

@poetaman
Copy link

poetaman commented Sep 17, 2021

Add a way of specifying a user filter for tmux list-sessions command in the following function of https://github.com/tmux-plugins/tmux-sessionist/blob/master/scripts/kill_session.sh.

Advantage: User can filter out any temporary sessions they might create during the run. For instance, I create a scratch session to hold a scratch pane, and would not want that to be accounted for while either while switching or deciding to not quit tmux. -f "#{!=:#{session_name},scratch}"

For instance,

number_of_sessions() {
	tmux list-sessions |
		wc -l |
		sed "s/ //g"
}

would become:

number_of_sessions() {
	tmux list-sessions -f "#{!=:#{session_name},scratch}" |
		wc -l |
		sed "s/ //g"
}
@poetaman poetaman changed the title Feature: add user filter option for tmux list-sessions command Feature: add user filter option to filter out any user's temporary/background sessions Sep 17, 2021
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

1 participant