Open
Description
The list is growing and is starting to need some sort of organisation. Currently, it displays 4 columns and 29 lines, with items being sorted alphabetically first by line, them by column. It would be a little more readable if it was sorted alphabetically by column instead.
But grouping by filetypes would probably be a great help, even if it makes the list a bit longer.
Metadata
Metadata
Assignees
Labels
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
NataliaBondarenko commentedon Sep 3, 2020
Hello!
We may not show the entire list at once, but we suggest the user to select the desired extensions.
Please take a look at this code example and write your opinion when you have time.
In any case, the changes for the supported types will be in a separate pull request.
Preview:
I'm currently doing tests for preview functions with the "file" command. This week, I want to finish the preview branch, tests, and documentation.
Then we will need to check everything on different operating systems. Check if everything is working correctly.
If you are not on vacation or have some free time, we can release the new version in September.
victordomingos commentedon Sep 3, 2020
In first place, I am noticing that our current list could probably fit in a standard 80x24 screen, using 2 or 3 additional columns.
Now... Your idea seems to point in the right direction, but I would insist in the idea of extension groups. The message could include the list of categories or groups and then the options to view a group (
v text
/view python
), search for extensions (s
/search txt
) or display all (a
/all
).Currently I am on a full time job, but I will try to get some time at night or weekend to review any pull requests, translate documentation changes and do some testing.
We are not in a hurry to release this, since the current version seems to be pretty stable (not that many complaints, right? 🙂). So we may take the necessary time to make sure everything is properly put together.
NataliaBondarenko commentedon Sep 4, 2020
The number of columns may depend on the size of the terminal window.
NataliaBondarenko commentedon Sep 4, 2020
"a", "all", "v", "text" - can be names of extensions. I suggest using upper case for group names and lower case for extension names.
Groups:
CODE
- Source code, shell scripts, html, style sheetsPYTHON
- Python filesDATA
- Config, settings, data files, markupOTHER
- Other text documentsNataliaBondarenko commentedon Sep 4, 2020
to view a group (upper case):
> PYTHON
search for extension (lower case):
> foo
search for extensions (lower case):
> py,csv,svg
> py, csv, svg
display all (upper case):
> ALL
NataliaBondarenko commentedon Sep 4, 2020
It is an open source project. We can take our time. We can stretch the work until the end of the year.
September
Complete all significant changes to the code (
file
preview and--supported-types
text).Update the documentation for new features.
Autumn
Testing.
Bug fixes and revision if necessary.
Correction of typos, clarifications, and additions to the text of the help or documentation, if necessary.
Winter
Release.
Tag for new version, generate docs for RTD.
Is this option right for you?
victordomingos commentedon Sep 4, 2020
Do you mean using the entered text's case to implicitly indicate which action should be performed? If so, I disagree. It's an unnecessarily unconventional behaviour.
With regards to the timing, it's ok. We will continue doing it at our own pace.
victordomingos commentedon Sep 4, 2020
I understand.
All the current versions had
st
as a run-once-and-return-immediately command. So, adding a prompt would change the existing user interface at the interaction level, which in the end may not be a good idea. We could opt to add a new set of commands instead, keeping the old one around as a way to maintain more compatibility with previous versions:count-files -st
/count-files --supported-types
--> (the old command) display the new supported types message, which should explain that there are many different supported types across several groups and listing the following commands. If we have enough space in a 80x24 terminal, we may display a few top results for each group, as examples.Then, some new commands
1. View a specific supported types/extensions group:
2. Search the supported types list for one or more extensions, like
txt
:3. view an alphabetical list of all the supported types (equivalent to the current
-st
option):4. View the list of all the supported types, grouped by category:
Since these new commands are getting too long, I would probably keep only the shorter form, maintaining the old one with both forms.
Also, I am not sure if we should keep the current
-st
behaviour instead (show all extensions), which would be more compatible with previous versions. If so, the new command number 3 above would not be needed, which would leave us with just 3 new commands to implement (numbers 1, 2 and 4).What do you think?
NataliaBondarenko commentedon Sep 4, 2020
In this case, a different case is needed to distinguish the keyword from the extension name. It seems to me that this is the simplest option.
We have already organized the help search by the similar principle of entering arguments/keywords (
--help-cmd
).If I understand correctly, are you suggesting adding new arguments to the parser?
In my opinion, the new set of commands is inconvenient. CLI already has a lot of arguments.
I think changing the appearance of the output of an existing argument won't do much harm to version compatibility. The call of the argument and its purpose remain the same.
Something like that:
NataliaBondarenko commentedon Sep 5, 2020
Another option is to categorize the supported types for now. Just divide the extensions into categories in this version, and that's it.
That is, display all extensions not in alphabetical order, as now, but all extensions sorted by groups.
This option allows you to organize the list of extensions a bit.
This option also preserves the "run-once-and-return-immediately" argument behavior.
victordomingos commentedon Sep 6, 2020
Having more commands registered in the parser is not a big issue, I believe. The only problem is the help page getting a bit longer. That's why
more
andless
exist in the unix shell.I am still convinced that we should not change the behaviour of
count-files -st
to include a prompt. It should remain a run once and return immediately command. We may change the kind and length of the information being presented, but not the interaction process.It is a good idea, since it would be less work to do before the next release. It's basically number 4 as stated above:
We can keep the old alphabetical view (
count-files -st
) and just add this new one.