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

Bug: text input ignores leading spaces #113

Open
tjquillan opened this issue Dec 15, 2018 · 1 comment · May be fixed by #114
Open

Bug: text input ignores leading spaces #113

tjquillan opened this issue Dec 15, 2018 · 1 comment · May be fixed by #114
Assignees
Labels

Comments

@tjquillan
Copy link

Description

When supplying something such as spinner.start(text) with a string like " =>" it simply prints in the console as "=>"

System settings

  • Operating System: Arch Linus
  • Terminal in use: Kitty
  • Python version: 3.7.1
  • Halo version: 0.0.22
  • pip freeze output:
    appdirs==1.4.3 astroid==2.1.0 attrs==18.2.0 backcall==0.1.0 black==18.9b0 certifi==2018.10.15 chardet==3.0.4 Click==7.0 colorama==0.3.9 cursor==1.2.0 decorator==4.3.0 docutils==0.14 enum34==1.1.6 flit==1.2.1 halo==0.0.22 idna==2.7 invoke==1.2.0 ipython==7.1.1 ipython-genutils==0.2.0 isort==4.3.4 jedi==0.13.1 Jinja2==2.10 lazy-object-proxy==1.3.1 log-symbols==0.0.11 MarkupSafe==1.1.0 mccabe==0.6.1 -e git+https://gitlab.com/iboyperson/mkproj.git@a01e7b129add68051339c447debaa3b554ef0afd#egg=mkproj mypy==0.641 mypy-extensions==0.4.1 parso==0.3.1 pexpect==4.6.0 pickleshare==0.7.5 prompt-toolkit==2.0.7 ptyprocess==0.6.0 pycodestyle==2.4.0 pyflakes==2.0.0 Pygments==2.3.0 pylint==2.2.0 pytoml==0.1.20 requests==2.20.1 shellingham==1.2.7 six==1.11.0 spinners==0.0.23 termcolor==1.1.0 toml==0.10.0 traitlets==4.3.2 typed-ast==1.1.0 urllib3==1.24.1 wcwidth==0.1.7 wrapt==1.10.11

Expected behaviour

I would expect for the leading white-space to be included in the text shown in the command line.

@UltraWelfare UltraWelfare linked a pull request Jan 20, 2019 that will close this issue
3 tasks
@manrajgrover manrajgrover self-assigned this Feb 16, 2019
@JoshKarpel
Copy link

@manrajgrover It seems like a better default would be to rstrip the user's text instead of strip, so that trailing whitespace is removed but leading whitespace (like in the original issue) is preserved. This is less of a change than #114 , and still doesn't let the user break the spinner by having \n or \r at the end of their text (although it doesn't stop them from putting it in front...). Would be happy to produce a PR along those lines if you think that's reasonable.

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

Successfully merging a pull request may close this issue.

3 participants