Skip to content

Instantly share code, notes, and snippets.

@grahamc
Created April 26, 2019 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grahamc/4888ef93e9f06631607db4faa6519342 to your computer and use it in GitHub Desktop.
Save grahamc/4888ef93e9f06631607db4faa6519342 to your computer and use it in GitHub Desktop.
[grahamc@Petunia:~]$ type bash
bash is /run/current-system/sw/bin/bash
[grahamc@Petunia:~]$ which bash
/run/current-system/sw/bin/bash
[grahamc@Petunia:~]$ bash
lol not this time
[grahamc@Petunia:~]$ /run/current-system/sw/bin/bash
haha not this one either
The secret is:
[grahamc@Petunia:~]$ which() { echo "/run/current-system/sw/bin/bash" }
[grahamc@Petunia:~]$ type() { echo "bash is /run/current-system/sw/bin/bash" }
[grahamc@Petunia:~]$ bash() { echo "lol not this time" }
[grahamc@Petunia:~]$ /run/current-system/sw/bin/bash() { echo "haha not this one either" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment