diff options
author | Joey Hess <joey@kitenet.net> | 2010-11-14 12:35:05 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-11-14 12:35:05 -0400 |
commit | a5c4dd974396d1dc9c3e55381215a904fa997cd2 (patch) | |
tree | 8f7f98fab145050b7f99ffe3358a7b616f171dd9 /Command.hs | |
parent | 54d0f73e67135ec675953d608d0780dfbb130f5d (diff) |
find: New subcommand.
Diffstat (limited to 'Command.hs')
-rw-r--r-- | Command.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Command.hs b/Command.hs index 40a21cacc..60d82d09f 100644 --- a/Command.hs +++ b/Command.hs @@ -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 |