Open masukomi opened 1 year ago
Please assign this issue to me
All yours maddy. Thanks for pitching in! :D
Please note that main
is slightly ahead of the official release. I just haven't released the new stuff because of this fez bug. Until i get that resolved new changes won't be pushed to fez. :/
Just to be explicit. I don't think there needs to be a check if the "new name" already exists, but 🤔 I wonder if there should be a check with the user. Something like "Hey, [new name] already exists. Do you want to merge [old name]'s records into it?"
Damn. just realized that if the target name exists then you have to repoint all the entity_project
to the new project id, and then delete the old project.
I was planning on "merge projects" as a separate ticket, but i think they're ultimately the same thing @maddy020.
Sorry that the complexity of this one is growing. If you just want to do a tiny PR that only renames IF the target name isn't already used I'd be fine with that. I can handle the merge stuff separately.
You still planning on poking this @maddy020 ?
Ohh @masukomi Forgot about this issue I got busy in other tasks Can you please tell me in which file this change is required
Project names should be unique, and can't be "archived",
Should the fix for this issue also add a hey remove project <name>
command as well? This would help declutter the output of hey projects
when a user no longer cares about a project. It would also make tab-completion more helpful (once #23 is implemented).
edit: Or maybe the command would be hey kill project <name>
for consistency with hey kill <name>
and hey kill timer <id>
?
Sorry been heads down in job-hunt land and accidentally removed "check github notifications" from the main part of my daily checklist... and thus kept forgetting to check 🤦♀️
i like hey kill <thing> <identifier>
but it introduces other concerns and additional complications. I've documented my thoughts in a project specific version in Issue #34
(now to tackle the open PRs... ;) )
cc @codesections
@maddy020 if you're still interested it'd prolly just be a change to the bin/hey
for the command and lib/Hey/Project.rakumod
for the actual behavior.
proposed interface
hey rename project <old name> <new name>
Behind the scenes this would just need to do a
Project names should be unique, and can't be "archived", so this change should be safe without other constraints.