Skip to content

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

@poetaman

Description

@poetaman

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"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions