top | item 41880654

(no title)

didsomeonesay | 1 year ago

.. and now the password is stored unencrypted in your bash history.

discuss

order

mmh0000|1 year ago

Use the `read` method the other poster said, or ensure HISTCONTROL is set and then prepend a space to commands that contain secrets.

  $ export HISTCONTROL=ignoreboth
  $  echo 'supersecret' | whatever

aftbit|1 year ago

That's a feature, not a bug. :P

Alright if you prefer:

    read PW; sleep 3; xdotool type "$PW"
Or if it's already on your clipboard:

    sleep 3; xdotool type "$(xclip -o)"

bombela|1 year ago

Prefix any command with a space and bash won't append to the history.

gruturo|1 year ago

Careful that's only true if you set HISTCONTROL to "ignorespace" or "ignoreboth".