0d80e9b4ee4925da24f5c2ef9082f6660d983113

Author
Elton Chen-Yu Ho <b01505026@ntu.edu.tw>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Fix zshrc alias when $EDITOR uses parameters (#6146)

According to #5003

if one exports EDITOR with parameters, say:
`export EDITOR='subl -w'`
 
running command:
`zshrc`
 
will result in:
`zsh: command not found: subl -w`

This can be fixed by updating common-aliases.plugin.zsh line 16 with:
`alias zshrc='${=EDITOR} ~/.zshrc' # Quick access to the ~/.zshrc file`

Fixes #5003

Diff

 1diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh
 2index 742798f27bd3f58efd8ff57bddb20b020b8b7c54..6a7daf845cb881eca36da66195c98bef012ad2bb 100644
 3--- a/plugins/common-aliases/common-aliases.plugin.zsh
 4+++ b/plugins/common-aliases/common-aliases.plugin.zsh
 5@@ -13,7 +13,7 @@ alias lS='ls -1FSsh'
 6 alias lart='ls -1Fcart'
 7 alias lrt='ls -1Fcrt'
 8 
 9-alias zshrc='$EDITOR ~/.zshrc' # Quick access to the ~/.zshrc file
10+alias zshrc='${=EDITOR} ~/.zshrc' # Quick access to the ~/.zshrc file
11 
12 alias grep='grep --color'
13 alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS} '