brew list --unbrewed
Very quick way to find files not installed by homebrew. Taken from a command by mxcl on the homebrew wiki. .DS_Store files and bin/brew are ignored.
This commit is contained in:
parent
14818039ae
commit
aedaaf79bf
@ -89,7 +89,7 @@ Commands:
|
|||||||
install formula ... [--debug|-d] [--interactive|-i] [--ignore-dependencies]
|
install formula ... [--debug|-d] [--interactive|-i] [--ignore-dependencies]
|
||||||
remove formula ...
|
remove formula ...
|
||||||
search [regex]
|
search [regex]
|
||||||
list [-v] [formula] ...
|
list [--brewed] [--unbrewed] [formula] ...
|
||||||
link formula ...
|
link formula ...
|
||||||
unlink formula ...
|
unlink formula ...
|
||||||
home formula ...
|
home formula ...
|
||||||
|
|||||||
@ -281,6 +281,17 @@ def warn_about_macports_or_fink
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def versions_of(keg_name)
|
||||||
|
`ls #{HOMEBREW_CELLAR}/#{keg_name}`.collect { |version| version.strip }.reverse
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# Taken from the homebrew wiki (http://wiki.github.com/mxcl/homebrew)
|
||||||
|
def unbrewed_files
|
||||||
|
`cd #{HOMEBREW_PREFIX}; find bin etc include lib man share -type f \\( ! -iname ".ds_store" ! -iname "brew" \\)`
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
########################################################## class PrettyListing
|
########################################################## class PrettyListing
|
||||||
class PrettyListing
|
class PrettyListing
|
||||||
def initialize path
|
def initialize path
|
||||||
|
|||||||
4
bin/brew
4
bin/brew
@ -39,7 +39,9 @@ begin
|
|||||||
end
|
end
|
||||||
|
|
||||||
when 'ls', 'list'
|
when 'ls', 'list'
|
||||||
if ARGV.named_empty?
|
if ARGV.flag? '--unbrewed'
|
||||||
|
puts unbrewed_files
|
||||||
|
elsif ARGV.named_empty?
|
||||||
ENV['CLICOLOR']=nil
|
ENV['CLICOLOR']=nil
|
||||||
exec 'ls', *ARGV.options<<HOMEBREW_CELLAR
|
exec 'ls', *ARGV.options<<HOMEBREW_CELLAR
|
||||||
elsif ARGV.verbose? or not $stdout.tty?
|
elsif ARGV.verbose? or not $stdout.tty?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user