Skip to content

Sathylias/incognito

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

What ?

A simple Bash-Compatible script that turns off history and tracks exported variables so these are unset when exiting incognito

Why ?

Sometimes when dealing with API Token and sensitive information, I like to turn off history. This script will help achieve that in a better way, while also supporting private export

How ?

  • This script needs to be sourced to work correctly. So after installation you can use source incognito. Configure an alias for it so it is less typing and more doing.
user@hostname $ chmod +x setup.sh
user@hostname $ ./setup.sh --prefix=/home/user/scripts
user@hostname $ echo 'alias incognito="source incognito"' >> $HOME/.bash_aliases
user@hostname $ incognito
  • You can use the export command with the nonprivate argument so the variable is retained upon deactivation
(incognito) user@hostname $ export SECRET="Password12345" nonprivate
  • When you are done with the shell, simply use deactivate which will exit incognito and clear exported variables
(incognito) user@hostname $ deactivate

Installation

Installation in /usr/local/bin by default

user@hostname $ ./setup.sh 

Installation in another specified directory

user@hostname $ ./setup.sh --prefix=/home/user/scripts/incognito

You're welcome!

About

Incognito Mode for Bash Shell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages