[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature Request: Add -a Option to mkdir for Single-Directory Names w
From: |
Pádraig Brady |
Subject: |
Re: Feature Request: Add -a Option to mkdir for Single-Directory Names with Custom Formatting |
Date: |
Tue, 14 Jan 2025 12:25:53 +0000 |
User-agent: |
Mozilla Thunderbird Beta |
On 14/01/2025 04:05, Ranuga D wrote:
Dear Coreutils Team,
I hope this message finds you well. I am writing to propose a feature
enhancement for the mkdir command. This enhancement introduces a new -a
option for handling single-directory names with spaces or special
formatting.
Proposed Functionality
1.
*Handling Spaces*: Create directories with spaces in their names without
requiring manual quoting or escaping.
Example:
mkdir "this is a single directory file name" -a
*Expected Result*: A directory named this is a single directory file name
is created.
2.
*Replacing Spaces with Underscores*: Introduce an additional option (
--convert-underscores) to replace spaces with underscores in directory
names.
Example:
mkdir "this is a single directory file name" -a --convert-underscores
*Expected Result*: A directory named this_is_a_single_directory_file_name
is created.
Rationale
Currently, users must manually quote or escape directory names with spaces
or special characters, which can be inconvenient. This proposed feature
would:
- Simplify directory creation workflows.
- Improve usability for both interactive use and script-based
environments.
- Enhance compatibility with systems or workflows where spaces in names
can cause issues.
Benefits of the Feature
- Streamlines directory creation for names with spaces or special
characters.
- Reduces potential errors caused by unescaped characters.
- Provides additional flexibility for users managing directory names
programmatically.
Thank you for considering this feature request. I believe it could
significantly enhance the usability of the mkdir command. Please let me
know if additional information or clarification is required.
I don't think this is appropriate for a few reasons:
This would be applicable to any tool, not just mkdir.
So it wouldn't be appropriate to add these options to all tools.
--convert-underscores etc. is too specific. Would you also have
--convert-hyphens.
As it stands you have the wealth of conversion utilities available in the
existing unix toolset, which can be applied with quoting etc.
cheers,
Pádraig