Skip to content

feat: add support for launching tryptich in specific directory#85

Merged
simonmclean merged 2 commits intosimonmclean:mainfrom
dladukedev:support-opening-specific-directory
Aug 22, 2025
Merged

feat: add support for launching tryptich in specific directory#85
simonmclean merged 2 commits intosimonmclean:mainfrom
dladukedev:support-opening-specific-directory

Conversation

@dladukedev
Copy link
Copy Markdown
Contributor

As a user, I would like the ability to launch Triptych with a specific directory selected instead of always launching in the current directory. This is useful for facilitating several workflows including creating a shortcut to a specific folder or jumping to another location within the file tree while working.

Changes

  • feat: Add support for argument to Triptych user command that opens Triptych in the specified
  • fix: correct directory check, replace not vim.fn.isdirectory(dir) with vim.fn.isdirectory(dir) == 0

Options Considered

Add args option to existing Triptych command (This PR)

  • Pros
    • Very few code changes required to implement
    • Uses existing flow, only now exposed to external users
  • Cons
    • Unclear what Triptych ~/MyDirectory should do if Triptych is already open, especially if "~/MyDirectory" is not the currently focused directory -- Currently just closes Triptych like the current command

Update to 3 user commands, Triptych(Toggle), TriptychOpen, TriptychClose with only TriptychOpen accepting a directory

  • Pros
    • Removes ambiguity of how Tryiptych ~/MyDirectory should act if Triptych is already open
    • Allows possibility of supporting calls to TryptichOpen while Tryptich is already open for quick navigation
  • Cons
    • Increases API support surface area
    • Unclear how easy it would be to implement the flow

@simonmclean simonmclean merged commit d404b80 into simonmclean:main Aug 22, 2025
1 of 3 checks passed
@simonmclean
Copy link
Copy Markdown
Owner

Nice one, thanks!

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