Distribution.Client.SavedFlags

cabal-install-3.12.1.0: The command-line interface for Cabal and Hackage.

Safe Haskell | None
Language | Haskell2010

Distribution.Client.SavedFlags

Synopsis

- readCommandFlags :: FilePath -> CommandUI flags -> IO flags
- writeCommandFlags :: Verbosity -> FilePath -> CommandUI flags -> flags -> IO ()
- readSavedArgs :: FilePath -> IO (Maybe [String])
- writeSavedArgs :: Verbosity -> FilePath -> [String] -> IO ()

# Documentation

readCommandFlags :: FilePath -> CommandUI flags -> IO flags #

Read command-line arguments, separated by null characters, from a file. Returns the default flags if the file does not exist.

writeCommandFlags :: Verbosity -> FilePath -> CommandUI flags -> flags -> IO () #

Write command-line flags to a file, separated by null characters. This format is also suitable for the `xargs -0` command. Using the null character also avoids the problem of escaping newlines or spaces, because unlike other whitespace characters, the null character is not valid in command-line arguments.

readSavedArgs :: FilePath -> IO (Maybe [String]) #

writeSavedArgs :: Verbosity -> FilePath -> [String] -> IO () #