Skip to content

feat: Add custom paths subdirectory max depth#207

Open
devsherif wants to merge 1 commit into
omerxx:mainfrom
devsherif:devsherif/subdirectory-max-depth
Open

feat: Add custom paths subdirectory max depth#207
devsherif wants to merge 1 commit into
omerxx:mainfrom
devsherif:devsherif/subdirectory-max-depth

Conversation

@devsherif
Copy link
Copy Markdown

Description

If custom paths subdirectories are set to true, you can set how deep the search for subdirectories should go

Before

Searching subdirectories was defaulted to 1 with no options to set the max-depth value.

After

An option can be set to specify how deep the subdirectory search can go.

If custom paths subdirectories are set to true, you can set how deep the
search for subdirectories should go
@omerxx
Copy link
Copy Markdown
Owner

omerxx commented Feb 22, 2026

Hey @devsherif sorry for getting to this now, we had to make some changes to fix bugs and restore the plugin this creates some conflicts, feel free to check them and LMK if you still like this merged
test

Repository owner deleted a comment from opencode-agent Bot Feb 27, 2026
@omerxx
Copy link
Copy Markdown
Owner

omerxx commented Feb 27, 2026

/opencode thoughts?

@opencode-agent
Copy link
Copy Markdown

This PR adds a configurable max depth for custom paths subdirectory search. Here's my analysis:

Changes:

  • New option @sessionx-custom-paths-max-depth with default 1 (maintains backward compatibility)
  • Uses find -maxdepth to limit subdirectory search depth in sessionx.sh:54

Thoughts:

  • The implementation is clean and follows existing patterns
  • Default of 1 preserves existing behavior - good for backward compatibility
  • The README documentation is clear about what the option does

One potential issue:
In sessionx.sh:54, if $custom_path_max_depth is empty (not set), it will expand to nothing and the find command would use default depth. However, since the default is set in sessionx.tmux:162, this shouldn't happen in practice.

The PR looks good to merge.

New%20session%20-%202026-02-27T16%3A29%3A12.255Z
opencode session  |  github run

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

Successfully merging this pull request may close these issues.

2 participants