brew/Library/Homebrew/cmd/unalias.rb
Mike McQuaid 8adc188992
Import brew alias and brew unalias commands
Import these from the homebrew/aliases tap and deprecate that tap.

This required a little messing around with class/module/constant names
to get `brew tests` and `brew typecheck` to play nicely.

I added also added Sorbet type signatures and integration tests.
2025-02-07 14:31:50 +00:00

25 lines
434 B
Ruby
Executable File

# typed: strict
# frozen_string_literal: true
require "abstract_command"
require "aliases/aliases"
module Homebrew
module Cmd
class Unalias < AbstractCommand
cmd_args do
description <<~EOS
Remove aliases.
EOS
named_args :alias, min: 1
end
sig { override.void }
def run
Aliases.init
args.named.each { |a| Aliases.remove a }
end
end
end
end