top | item 31855669

(no title)

gregnavis | 3 years ago

I do something similar but 1. for aliases and 2. use period. For example, when working on a Rails project I define the following alias:

    function .routes() {
      if [[ $# -eq 0 ]]; then
        .rails routes
      else
        .rails routes | grep $@
      fi
    }
where .rails is another alias (for running bundle exec rails ...). I can then run ".routes webhook" and see all routes containing "webhook".

Last but not least, I automated the whole thing with bash-ctx (https://github.com/gregnavis/bash-ctx).

discuss

order

No comments yet.