Bendtsen, Jon wrote:
> On 18/10/2012, at 10.44, Jim Meyering wrote:
>
>> Bendtsen, Jon wrote:
>>> I here by propose that you remove the - in the middle of any
>>> commands. The purpose is to improve the usability because having to
>>> type a - in the middle of a command interrupts my keyboard flow, where
>>> as not typing it does not.
>>>
>>> Further more there is only 1 command that has this issue, and that is
>>>
>>> align-check TYPE N check partition N for TYPE(min|opt) alignment
>>
>> Thanks for the suggestion, but that hyphen makes the command name more
>> readable. Removing it would break scripts using the hyphen, and adding
>> an alias would seem to be unwarranted complication for minimal benefit.
>
> use a blank space?
> align check optimal 1
> space is easier to type than - a lot easier.
That would pose the same problem, and more.
Not only would it break scripts or require adding an alias,
but converting the command name from a single token to
two tokens would require changing the command-parsing logic.
>> Besides, how often do you type commands to parted?
>> If you find yourself doing it a lot, I would suggest
>> that you script it, if only to decrease possibility of error.
>
> I type it every time I create a new partition to test that it is properly
> aligned.
How about creating a shell function? E.g., put this in your
.bashrc (change "acheck" to whatever name you like, and change
"opt" to "min" if you'd prefer the latter)
acheck() { parted -s $1 align-check opt $2; }
then you'd type only things like this at the command line:
acheck /dev/sdd 1
acheck /dev/sdd 2
...
acheck /dev/sda 1