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

Add handling of multiple repos with same name in different locations #6

Open
evanthegrayt opened this issue May 16, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@evanthegrayt
Copy link
Owner

Assuming the following:

CDC_DIRS=(dir1 dir2)
cdc repo

and the following directories both exist

dir1/repo
dir2/repo

We need to ask the user which one to cd to. Currently, it will just cd to the first instance it finds.

We should gather existing directories in an array, and if the array's size is > 1, prompt the user. Consider using the select command.

@evanthegrayt evanthegrayt self-assigned this May 16, 2019
@evanthegrayt evanthegrayt added the enhancement New feature or request label May 16, 2019
@evanthegrayt evanthegrayt added bug Something isn't working and removed enhancement New feature or request labels Nov 17, 2019
@evanthegrayt
Copy link
Owner Author

evanthegrayt commented Nov 21, 2019

After some thought, I would hate to be prompted every time. This is what I think should happen:

  • The first time a duplicate is found, ask the user which to prefer. Cache the result.
  • Going forward, the cached result will take precedence.
  • The user can pass a flag to re-prompt and re-cache.
  • Debug mode will display a warning every time a cached directory is used. This way, the user will know why it always goes to an unexpected directory.
  • 💥

I say 💥 like it's an easy fix, but it'll be a fundamental change and will be a medium-difficulty effort.

@evanthegrayt evanthegrayt added enhancement New feature or request and removed bug Something isn't working labels Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant