How to Customize Your Bash Aliases Based on the Current Directory

A computer mouse on a desk with hands on a keyboard slightly blurred in the background.
Hate it!
  • I should be able to define aliases in any directory.
  • When using the terminal, I should have access to the aliases defined in the current directory and those defined anywhere above the current directory.
  • Aliases that are defined lower in the tree (i.e. in a more-specific folder) should override aliases with the same name that are defined higher in the tree.
  • Aliases defined in my home directory should always be included, even outside that directory.
  • Aliases should automatically update themselves whenever I change directories in the terminal.

--

--

--

Software engineer. Great British Baking Show enthusiast. Obsessed with Beat Saber. Powered by insatiable curiosity and too much Diet Coke.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What Developers and Designers need to know about Intellectual property

How to serve API content to a S3 hosted site

Boxee Download For Windows

Meme Lordz Development Update #5

The power of search: Regular Expressions

Cloning of Expedia Website

T-zone series: The software testing pattern (and the anti pattern)

Around the “Omnichannel Agent”: its Technical and Change Management approach.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Amanda Reilly

Amanda Reilly

Software engineer. Great British Baking Show enthusiast. Obsessed with Beat Saber. Powered by insatiable curiosity and too much Diet Coke.

More from Medium

What did I learn by throwing a bottle into my water tank?

Impact of Azure IoT Hub and the evolution and growth of IoT as a whole

Back up! Don’t JUST sync your data

Appium with Parallel Execution: PART — 1