LoginSignup
3
1

More than 5 years have passed since last update.

brew (un)?instal にはaliasが張られている ~ パッケージマネージャーには意外とある

Posted at

Qiitaの記事内で、間違えそうもない人がコマンドで
brew instal ~
というタイポを書いているのを見て、少し引っかかったので調査。

legacy-homebrew/global.rb at master · Homebrew/legacy-homebrew

HOMEBREW_INTERNAL_COMMAND_ALIASES = {
  "ls" => "list",
  "homepage" => "home",
  "-S" => "search",
  "up" => "update",
  "ln" => "link",
  "instal" => "install", # gem does the same

新しい方でも

brew/global.rb at 11f81f41c95c3a14db6ac7865d7ffadef5c26c7b · Homebrew/brew

HOMEBREW_INTERNAL_COMMAND_ALIASES = {
  "ls" => "list",
  "homepage" => "home",
  "-S" => "search",
  "up" => "update",
  "ln" => "link",
  "instal" => "install", # gem does the same
"uninstal" => "uninstall",

# gem does the sameとコメントにあるように、Rubyのgemでも同様にinstalでインストールできる。

PHPのComporserでも出来て、pipやnpmではミスとするものの、installをサジェストしてくれる。

意外にnpmに比してyarnは単純なエラーとなり、yumも同様。

恐らく打ち間違いを助けるためのaliasだと思われるが、デフォルトで正常に動くコマンドに対してtypoと言い切っていいものか悩む。記事にするならば正しい英単語のほうが望ましいとは思うのだが…。

人間性をさがせよ QiitaのTypo検出 【緩募】 - Qiita

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1