Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make -t mandatory #22

Open
LukeSavefrogs opened this issue Dec 2, 2023 · 0 comments
Open

Make -t mandatory #22

LukeSavefrogs opened this issue Dec 2, 2023 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@LukeSavefrogs
Copy link
Owner

LukeSavefrogs commented Dec 2, 2023

Problem

Right now the behaviour is not quite clear for people used to column, since the -t parameter can be omitted.

Enforcing using it may help in understanding that ONLY the "table mode" is supported

image

Solution

The program should exit with error if the -t parameter is not supplied, to make it clear that ONLY the "table" mode is supported.

  • Before:
$ printf "1 2 3" | column_ansi
1  2  3
  • After:
$ printf "1 2 3" | column_ansi
Error: column_ansi only supports the "table" mode from the original `column` command

Also, the inline help should refleact this change:

  • Before:
$ column_ansi.sh --help
USAGE:
        column_ansi [-s SEPARATOR] [-o SEPARATOR] [-R COLUMNS] [-H COLUMNS] [-C COLUMNS]      
        column_ansi --help

OPTIONS:
        -t, --table
                Does nothing, was left for compatibility reasons. [DEFAULT]
  • After:
$ column_ansi.sh --help
USAGE:
        column_ansi -t [-s SEPARATOR] [-o SEPARATOR] [-R COLUMNS] [-H COLUMNS] [-C COLUMNS]      
        column_ansi --help

OPTIONS:
        -t, --table
                Create a table, required to make this behaviour explicit.
@LukeSavefrogs LukeSavefrogs added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 3, 2023
@LukeSavefrogs LukeSavefrogs self-assigned this Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant