Home

Use a Preceding Space in Terminal to Hide from History

This is a trick to running commands that you don’t want to be saved in your history.

You may want to run a command that isn’t stored in your history. You can do this with a preceding space.

# no preceding space
someCmd --key ABC123

history
# 98 ...
# 99 someCmd --key ABC123

# with preceding space
anotherCmd --key ABC123
cd ~

# notice `anotherCmd` is missing
history
# 98 ...
# 99 someCmd --key ABC123
# 100 cd ~

A common scenario may be when using sensitive values a single time (i.e. where you don’t want to take the time to set environment variables).

Let's Connect

Keep Reading

3 Ways to Add an Image to GitHub README

Images often come in handy alongside documentation. Here are a few methods for adding them to your README and other markdown files.

Jan 30, 2021

Change Back to Previous Directory

Navigate to the directory you visited previously without the need of remembering or typing the name.

Jul 23, 2022

Use Commit Hashes when Sharing GitHub URLs

Sharing GitHub commit hashes directly works for ephemeral uses, but there is a safer way for links that need to last.

Dec 15, 2022