DannyBen / alf

Bash Alias Generator and Manager
MIT License
90 stars 5 forks source link

Add escape character #15

Closed DannyBen closed 5 years ago

DannyBen commented 5 years ago

This PR enables the use of an exclamation mark to prefix sub commands, in order to "escape" their parent command. A nice use case for this functionality, is to add functionality to a command by using another.

For instance, the below adds a deploy command to docker-compose, which is facilitated by docker stack and does not actually exist in docker-compose:

# alf.conf
dc: docker-compose
  deploy: !docker stack deploy -c docker-compose.yml
  upd: up -d