From 29ed1800e1618fd58c5ca35568f9808a044d6cd3 Mon Sep 17 00:00:00 2001 From: Joseph Frazier <1212jtraceur@gmail.com> Date: Wed, 29 Jun 2016 15:43:53 -0400 Subject: [PATCH] Add `brew update` to Homebrew commands `brew update` is implemented in shell instead of ruby, so `_get_brew_commands` needs to list .sh files as well as .rb Resolves https://github.com/nvbn/thefuck/issues/526 --- thefuck/rules/brew_unknown_command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thefuck/rules/brew_unknown_command.py b/thefuck/rules/brew_unknown_command.py index ae6e89ba..35f6e937 100644 --- a/thefuck/rules/brew_unknown_command.py +++ b/thefuck/rules/brew_unknown_command.py @@ -15,7 +15,7 @@ def _get_brew_commands(brew_path_prefix): brew_cmd_path = brew_path_prefix + BREW_CMD_PATH return [name[:-3] for name in os.listdir(brew_cmd_path) - if name.endswith('.rb')] + if name.endswith(('.rb', '.sh'))] def _get_brew_tap_specific_commands(brew_path_prefix):