joshmedeski / sesh

Smart session manager for the terminal
MIT License
417 stars 17 forks source link

feat: add flag to hide the currently attached session #51

Closed markfeinstein closed 5 months ago

markfeinstein commented 5 months ago

Add a flag to the list and choose commands to provide a means of excluding currently attached sessions when generting a list of current tmux sessions.

closes #50

help output

``` ❯ go run *.go list --help NAME: sesh list - List sessions USAGE: sesh list [command options] [arguments...] OPTIONS: --tmux, -t show tmux sessions (default: false) --zoxide, -z show zoxide results (default: false) --hide-attached, -H don't show currently attached sessions (default: false) --help, -h show help ``` ``` ❯ go run *.go choose -h NAME: sesh choose - Select session USAGE: sesh choose [command options] [arguments...] OPTIONS: --tmux, -t show tmux sessions (default: false) --zoxide, -z show zoxide results (default: false) --hide-attached, -H don't show currently attached sessions (default: false) --help, -h show help ```

show attached

``` ❯ go run *.go list default ```

hide attached

``` ❯ go run *.go list --hide-attached ❯ ``` ``` ❯ go run *.go list -H ❯ ```

AgusDOLARD commented 5 months ago

this should not be a flag, it should be default behavior

joshmedeski commented 5 months ago

Why do you say that @AgusDOLARD? We've been going back and forth about making it a configuration option vs a flag.