r-darwish / alma

Create Arch Linux based bootable USB drives
GNU General Public License v3.0
389 stars 31 forks source link

Add flag to sort preset directories numerically #42

Closed jamesmcm closed 4 years ago

jamesmcm commented 4 years ago

Task

Currently we sort presets in a given directory alphabetically, however in some circumstances it maybe useful to do numerical sorting.

i.e. alphabetically:

1_user.toml
10_other_preset.toml
2_config.toml
...

numerically:

1_user.toml
2_config.toml
...
10_other_preset.toml

Justification

This would save users and preset developers having to left-pad the correct number of 0s to their preset filenames if using numbers to enforce the preset execution order.

r-darwish commented 4 years ago

I follow the same convention of fontconfig and other of that kind, and the user is responsible to pad his script numbers in these tools.