Giter Club home page Giter Club logo

terminal-aliases's Introduction

terminal-aliases

Terminal aliases for faster and more convenient work with the terminal. Mainly focused on git and terraform work.

Installation

ZSH

Using Oh-my-zsh:

  1. Clone this repository in oh-my-zsh's plugins directory:
git clone https://github.com/dvir-levy/terminal-aliases.git ~/.oh-my-zsh/custom/plugins/terminal-aliases
  1. Activate the plugin in ~/.zshrc
    NOTE: add the plugin last in order so it could overwrite other aliases if any.
plugins=(
  plugin1
  plugin2
  ...
  teminal-aliases
)
  1. Set the WORKSPACE_PATH environment variable to your own workspace directory that include your repos.
    NOTE: The environment variable must be set before the plugins call in ~/.zshrc
export WORKSPACE_PATH=<MY_WORKSPACE>

The following script adds it to the beginning of ~/.zshrc. Make sure to change <MY_WORKSPACE> to your workspaces path.

echo "export WORKSPACE_PATH=<MY_WORKSPACE>" > ~/.zshrc.tmp
echo "" >> ~/.zshrc.tmp
cat ~/.zshrc >> ~/.zshrc.tmp
mv ~/.zshrc.tmp ~/.zshrc

echo "# terminal-aliases plugin" > ~/.zshrc.tmp
echo "" >> ~/.zshrc.tmp
cat ~/.zshrc >> ~/.zshrc.tmp
mv ~/.zshrc.tmp ~/.zshrc

NOTE: the folders structure should be single workspace with several repos in it. for example:

.my-workspace
├──repo1
├──repo2
├──repo3
├──terraform-repo1
└──terraform-repo2
  1. Run exec zsh to take changes into account:
exec zsh

Using zplug:

  1. Add this repo to ~/.zshrc:
zplug "dvir-levy/terminal-aliases", as: plugin

Usage Examples

color picker
  1. git checkout to main/master and pull
gcm
  1. git status
gst
  1. Create new GitHub Pull Request
newpr my_new_pr_name SECURITY-357

NOTE: the branch should be main/master and commit changes should be made locally on master. the alias will makes sure to create new branch and pull request.

  1. 'git add' to all changes, 'git commit' with your custom comment and 'git push' - all together
gam "added debugging methods"
  1. change directory to a repo and show its content
repo1
  1. terraform apply
ta
  1. terraform init + terraform plan
tip

License

This repo is licensed under the terms of the MIT Open Source license and is available for free. Feel free to open pull request and help improve it

terminal-aliases's People

Contributors

dvir-levy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.