From e88952353d09a6060ccb97caf8e81beda0fb1b3d Mon Sep 17 00:00:00 2001 From: Farhan Salam Date: Thu, 8 Sep 2016 16:42:39 +0500 Subject: [PATCH] Alias commands added in cheatsheet --- Cheatsheet.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Cheatsheet.md b/Cheatsheet.md index 053f8ea..4533ed8 100644 --- a/Cheatsheet.md +++ b/Cheatsheet.md @@ -43,6 +43,26 @@ source ~/.oh-my-zsh/templates/zshrc.zsh-template See `~/.oh-my-zsh/lib/directories.zsh` +### Alias +example: + +```bash +alias -s rb=vim #opens ruby files in vim +# $ foo.rb +# vim => foo.rb +alias -g gp='| grep -i' #creates a global alias for grep +# $ ps ax gp ruby +# (all ruby process will be displayed) +``` + +| Flag | Description | +|:------|:------------------------------------------------| +| L | print each alias in the form of calls to alias | +| g | list or define global aliases | +| m | print aliases matching specified pattern | +| r | list or define regular aliases | +| s | list or define suffix aliases | + ## Tab-completion | For options and helpful text of what they do |