packages feed

cli-setup 0.1.0.2 → 0.1.0.3

raw patch · 2 files changed

+9/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

cli-setup.cabal view
@@ -1,5 +1,5 @@ name:                cli-setup-version:             0.1.0.2+version:             0.1.0.3 synopsis:            Helper setup scripts for packaging command-line tools. description:         Provides functions to set up manpages and shell completions. Intended to be used in the @Setup.hs@ module. homepage:            https://github.com/vmchale/cli-setup#readme
src/Distribution/CommandLine.hs view
@@ -9,6 +9,8 @@ import           System.Environment (lookupEnv) import           System.Process     (readCreateProcessWithExitCode, shell) +-- | Add a line exporting the modified @MANPATH@ to the user's @bashrc@, if it+-- does not exist already. setManpath :: IO () setManpath = do     home <- lookupEnv "HOME"@@ -21,6 +23,10 @@                  void (readCreateProcessWithExitCode (shell $ "MANPATH=" ++ x ++ "/.local/share mandb") ""))         Nothing -> pure () +-- | As an example, if your source tarball contains a file @man/madlang.1@ you+-- could use+--+-- > writeManpages "man/madlang.1" "madlang.1" writeManpages :: FilePath -- ^ Source File               -> FilePath -- ^ Manpage file name               -> IO ()@@ -33,6 +39,8 @@             writeFile (manPath ++ "/" ++ p') =<< readFile p         Nothing -> pure () +-- | Add a line to the user's @bashrc@ so that command-line completions work+-- automatically. writeBashCompletions :: String -- ^ Executable name                      -> IO () writeBashCompletions exeName = do