Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new directory/project #114

Closed
RazoBeckett opened this issue Aug 4, 2024 · 6 comments
Closed

Create new directory/project #114

RazoBeckett opened this issue Aug 4, 2024 · 6 comments

Comments

@RazoBeckett
Copy link

Is there a way to create a new directory or project at a specific path? For example, I have a project called "aabbcc" located in the path ~/project/aabbcc. Is it possible to:

  1. Determine the parent directory of the project (in this case, ~/project) where the cursor is currently pointing in a list.
  2. Provide a pop-up or another method to create a new directory within that path.
junglerobba added a commit to junglerobba/tmux-sessionizer that referenced this issue Aug 5, 2024
jrmoulton pushed a commit that referenced this issue Aug 13, 2024
@junglerobba
Copy link
Contributor

Hi @RazoBeckett,
Does a94fe14 cover enough of your usecase? It’s a rather simplistic implementation compared to what you described, but it’s certainly all that I would ever use it for.

@RazoBeckett
Copy link
Author

Hey @junglerobba,
Thanks for responding to this. I'll check it out when I have some free time and will close the issue then.

@RazoBeckett
Copy link
Author

it's not same as i wanted though but i can't ask for much it's better than nothing.
Thanks, Closing the issue.

@junglerobba
Copy link
Contributor

Hey, I made another update in b23e8a0
Maybe check out if that is closer to what you wanted

@RazoBeckett
Copy link
Author

Thank you, I really appreciate your work. However, the implementation isn't quite what I expected for this feature.

Here's how I envision it working:
For example, if I have a project located at ~/Dev/personal/my-project, and I open tms, the output should be:

output:

 some-other-project
 my-project
>another-project

now i move my cursor to the my-project:
output:

 some-other-project
>my-project
 another-project

Then, by pressing a keybind or shortcut (e.g., Ctrl+Shift+I) a pop-up or something similar should come up so that user can enter a name for project then a new repository should be initialized under the same parent directory as my-project (which is personal in this case). The path for the new repository should be ~/Dev/personal/name-provided-by-user-for-project.

@junglerobba
Copy link
Contributor

The way the feature is implemented right now you could achieve basically the same result, just with different steps.
Assuming you have ~/Dev/personal configured in your search paths, which it should be if tms is showing projects located there:
You'd run tms init-repo <name>, then either

  • if ~/Dev/personal is the only configured search path, ~/Dev/personal/<name> will be created and a session opened there
  • if you have multiple search paths configured, a picker would open up showing
>~/Dev/personal
 ...<other dirs>

When selecting the directory, ~/Dev/personal/<name> will be created and a session opened there.
So I'm sorry, but I fail to see the relevant difference, besides the order of steps

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

No branches or pull requests

2 participants