microsoft / microsoft/PowerToys
New+ FileNames don't inherit Changed Folder names with $PARENT_FOLDER_NAME
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 139k
- Forks
- 8.6k
- PR merge metrics
- PR metrics pending
Description
Description of the new feature / enhancement
I was trying to use New+ to make it so I could create python module skeletons quicker. So I setup a New+ template as such
- PythonModule (folder)
- init.py (file)
- $PARENT_FOLDER_NAME.py (file)
But when I then use this template in New+ I obviously rename the PythonModule folder to whatever I want (e.g. Testing) but the file that has the macro in it, remains named PythonModule.py
Obviously this feels like a bug but maybe it's intended, but it would be very helpful if the macro'd file actually renamed to the new folder (as it seems was more likely to be the intended use)
Scenario when this would be used?
Anytime you use a New+ template and you'd expect the file to have the parent folder name as part of the file.
Supporting information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the New+ template handling for folder renames and the $PARENT_FOLDER_NAME macro. Reproduce the PythonModule-to-Testing example, then verify that the generated file is renamed from PythonModule.py to Testing.py while init.py remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100