8

使用 command 命令暂时忽视 alias

 3 years ago
source link: https://arminli.com/ignore-alias-in-terminal/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Armin's Blog

使用 command 命令暂时忽视 alias

June 03, 2017

我们经常会为某个命令设置 alias,比如我在 zsh 中设置了

alias diff="icdiff"

(icdiff 是一个加强版的 diff)

➜  which diff
diff: aliased to icdiff
➜  diff
Usage: icdiff [options] left_file right_file

Show differences between files in a two column view.

Options:
  --version             show program's version number and exit
……

如果想暂时忽略 alias,使用系统自带的 diff,则可以在前面加上 command 命令:

➜  command diff --help
Usage: diff [OPTION]... FILES
Compare files line by line.

  -i  --ignore-case  Ignore case differences in file contents.
  --ignore-file-name-case  Ignore case when comparing file names.
……

Reference


Profile picture

Written by Armin Li , a venture capitalist. [Weibo] [Subscribe]


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK