Skip to content

Commit 2f1dfc1

Browse files
authored
feat: add root command (#191)
* feat: add root command * chore: update mockery * docs: add filter by root gum example
1 parent 39e5fab commit 2f1dfc1

File tree

29 files changed

+253
-34
lines changed

29 files changed

+253
-34
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,18 @@ I recommend adding this to your `tmux.conf`:
184184
bind -N "switch to root session (via sesh) " 9 run-shell "sesh connect --root \'$(pwd)\'"
185185
```
186186

187+
### Filter by root
188+
189+
If you want to filter your search by the root of the active project, you can modify your piker by using the `sesh root` command:
190+
191+
```sh
192+
bind-key "R" display-popup -E -w 40% "sesh connect \"$(
193+
sesh list -i -H | gum filter --value \"$(sesh root)\" --limit 1 --fuzzy --no-sort --placeholder 'Pick a sesh' --prompt=''
194+
)\""
195+
```
196+
197+
I have this bound to `<prefix>+R` so I can use an alternative binding.
198+
187199
**Note:** This will only work if you are in a git worktree or git repository. For now, git worktrees expect a `.bare` folder.
188200

189201
## Configuration

cloner/mock_Cloner.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configurator/mock_Configurator.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

connector/mock_Connector.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dir/mock_Dir.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

execwrap/mock_Exec.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

execwrap/mock_ExecCmd.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

git/mock_Git.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

home/mock_Home.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

icon/mock_Icon.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)