find: New subcommand.

This commit is contained in:
Joey Hess 2010-11-14 12:35:05 -04:00
parent 54d0f73e67
commit a5c4dd9743
5 changed files with 47 additions and 0 deletions

View file

@ -158,6 +158,13 @@ withAll w a params = do
w a [Git.workTree g]
else w a params
{- Provides a default parameter to a with search. -}
withDefault :: String-> SubCmdSeekStrings -> SubCmdSeekStrings
withDefault d w a params = do
if null params
then w a [d]
else w a params
{- filter out files from the state directory -}
notState :: FilePath -> Bool
notState f = stateLoc /= take (length stateLoc) f