better multiword parameter handling
This way, individual words as entered on the command line are available to commands.
This commit is contained in:
parent
8fa17eaba0
commit
ceff04ff3e
7 changed files with 30 additions and 22 deletions
|
@ -47,6 +47,8 @@ type CommandCleanup = Annex Bool
|
|||
- functions. -}
|
||||
type CommandSeekStrings = CommandStartString -> CommandSeek
|
||||
type CommandStartString = String -> CommandStart
|
||||
type CommandSeekWords = CommandStartWords -> CommandSeek
|
||||
type CommandStartWords = [String] -> CommandStart
|
||||
type CommandSeekKeys = CommandStartKey -> CommandSeek
|
||||
type CommandStartKey = Key -> CommandStart
|
||||
type BackendFile = (FilePath, Maybe (Backend Annex))
|
||||
|
@ -143,8 +145,8 @@ withFilesNotInGit a params = do
|
|||
newfiles <- liftIO $ runPreserveOrder (Git.notInRepo repo) params
|
||||
newfiles' <- filterFiles newfiles
|
||||
backendPairs a newfiles'
|
||||
withString :: CommandSeekStrings
|
||||
withString a params = return [a $ unwords params]
|
||||
withWords :: CommandSeekWords
|
||||
withWords a params = return [a params]
|
||||
withStrings :: CommandSeekStrings
|
||||
withStrings a params = return $ map a params
|
||||
withFilesToBeCommitted :: CommandSeekStrings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue