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

disappearing leading plus #151

Open
honzajde opened this issue Oct 13, 2022 · 2 comments
Open

disappearing leading plus #151

honzajde opened this issue Oct 13, 2022 · 2 comments

Comments

@honzajde
Copy link

This

echo '+123' | tv

produces:

        tv dim: 0 x 1
        123

This is an issue e.g. with phone numbers (without spaces).

This is ok:

  echo '+44 123' | tv

        tv dim: 0 x 1
        +44 123 

Bug or feature? :)

if this is a feature, I wish it was better documented.

@alexhallam
Copy link
Owner

alexhallam commented Oct 13, 2022 via email

@honzajde
Copy link
Author

I can imagine it's really hard (or straight impossible) to infer correct type (another example might be when having only handful of rows).

First line of thought: give type hints, e.g:

Options could be something like this:

-s --string
-d --digits (integers)
-f --float 
tv -s '"mobile phone","home phone"' -f 'price' -d 'count'

In case of tv formatting rules, the -f and -d don't see, to be needed at all

Maybe -f to avoid sigfig option

And maybe in the future -f11.3 "Big Money" equivalent to printf '%11.3f'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants