brew list --unbrewed fix
Determine all directories that aren't Homebrew ones. Exec find. I prefer to keep short stuff in bin/brew so people reading the code have a better idea of what happens, and what sort of functions are useful for the sorts of things we do with Homebrew.
This commit is contained in:
parent
e4a32736cd
commit
c61d96529c
@ -289,12 +289,6 @@ def versions_of(keg_name)
|
||||
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
|
||||
def initialize path
|
||||
|
6
bin/brew
6
bin/brew
@ -40,7 +40,11 @@ begin
|
||||
|
||||
when 'ls', 'list'
|
||||
if ARGV.flag? '--unbrewed'
|
||||
puts unbrewed_files
|
||||
# Taken from the homebrew wiki (http://wiki.github.com/mxcl/homebrew)
|
||||
dirs = HOMEBREW_PREFIX.children.select { |pn| pn.directory? }.collect { |pn| pn.basename.to_s }
|
||||
dirs -= ['Library', 'Cellar', '.git']
|
||||
Dir.chdir HOMEBREW_PREFIX
|
||||
exec 'find', *dirs + %w[-type f ( ! -iname .ds_store ! -iname brew )]
|
||||
elsif ARGV.named_empty?
|
||||
ENV['CLICOLOR']=nil
|
||||
exec 'ls', *ARGV.options<<HOMEBREW_CELLAR
|
||||
|
Loading…
x
Reference in New Issue
Block a user