diff --git a/README.md b/README.md index 45f435f..1ef9e04 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud). -_1002 TILs and counting..._ +_1003 TILs and counting..._ --- @@ -944,6 +944,7 @@ _1002 TILs and counting..._ - [Grep For Files With Multiple Matches](unix/grep-for-files-with-multiple-matches.md) - [Grep For Multiple Patterns](unix/grep-for-multiple-patterns.md) - [Hexdump A Compiled File](unix/hexdump-a-compiled-file.md) +- [Ignore The Alias When Running A Command](unix/ignore-the-alias-when-running-a-command.md) - [Interactively Browse Available Node Versions](unix/interactively-browse-availabile-node-versions.md) - [Jump To The Ends Of Your Shell History](unix/jump-to-the-ends-of-your-shell-history.md) - [Kill Everything Running On A Certain Port](unix/kill-everything-running-on-a-certain-port.md) diff --git a/unix/ignore-the-alias-when-running-a-command.md b/unix/ignore-the-alias-when-running-a-command.md new file mode 100644 index 0000000..64b1bb0 --- /dev/null +++ b/unix/ignore-the-alias-when-running-a-command.md @@ -0,0 +1,29 @@ +# Ignore The Alias When Running A Command + +I have a number of shell aliases set up to override one command with another. +For instance, I want to run `bat` anytime I type `cat`, so I have `alias +cat=bat` in my shell configuration. + +But what if I were to ever want to run `cat` instead of `bat`? + +Aliases can be ignored several ways: + +1. Precede the command with a backslash. + +```bash +$ \cat +``` + +2. Wrap the command in quotes. + +```bash +$ 'cat' +``` + +3. Pass the command to `command`. + +```bash +$ command cat +``` + +[source](https://unix.stackexchange.com/questions/39291/run-a-command-that-is-shadowed-by-an-alias)