question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there a filter to hide input on terminal?

See original GitHub issue

I want to hidden the typing of this field: It is possible in the latest version (3.0.6)? I didn’t find anything about it in the doc

password = shell.Prompt("Insert your password:")

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
francescobiancacommented, Jan 28, 2022

Hi @derks,

thanks! At the moment I have implemented as follows:

from cement import Controller, ex, shell
from getpass import getpass

@ex(help='Login command')
def login(self):
    username = shell.Prompt("Enter username:")
    password = getpass("Enter password: ")
    # password = shell.Prompt("Insert your password:")

    authentication_service.login(username.input, password)

I will replace when the feature is added. Great work, great framework!

0reactions
derkscommented, Aug 18, 2022

@francescobianca this will be available in stable/3.0.8:

from cement.utils import shell

p = Prompt('Enter secure info:', suppress=True)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Hiding User Input in a Bash Terminal | Baeldung on Linux
In this tutorial, we'll go over a few methods for hiding user input in the terminal or a Bash script: The read command;...
Read more >
Hide input on command line - java - Stack Overflow
Yes can be done. This is called Command-Line Input Masking. You can implement this easily. You ...
Read more >
How to hide text input in terminal - bash - Ask Ubuntu
I'm writing a script in Bash that prompts the user for a password and I need the typed text to not show, as...
Read more >
Reading passwords without showing on screen in Bash Scripts
For anyone reading this: do NOT read in passwords with echo on and black-on-black. The password is still transmitted, and if the terminal...
Read more >
Ubuntu Users: How to Asterisks When Typing Your Password ...
Enter your sudo password in the terminal and you'll see nothing. No asterisks, no characters, no nothing. You're not doing it wrong and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found