on master help sign in
Check for fish and zsh completion as well

Also change nix-build message to include path

commit405c7fa0814922cb269a177987bbc469c96116a0 authorSridhar Ratnakumar <srid@srid.ca> dateThu 10 May 2018, 11:48 (8 years ago) parented7215f
2 files changed+5−3
lib/command/src/Obelisk/Command/CLI.hs+2−2 lib/command/src/Obelisk/Command/Nix.hs+3−1
lib/command/src/Obelisk/Command/CLI.hs+2−2
@@ -25,8 +25,8 @@ withSpinner
2525 -> IO a
2626withSpinner s e f = do
2727 isTerm <- hIsTerminalDevice stdout
28− -- When running in bash completion, disable the spinner. TODO: Do this using ReaderT and config.
29− inBashCompletion <- isInfixOf "bash-completion" . unwords <$> getArgs
28+ -- When running in shell completion, disable the spinner. TODO: Do this using ReaderT and config.
29+ inBashCompletion <- isInfixOf "completion" . unwords <$> getArgs
3030 if | not isTerm || inBashCompletion -> f
3131 | otherwise -> do
3232 spinner <- dots1Spinner (1000 * 200) s
lib/command/src/Obelisk/Command/Nix.hs+3−1
@@ -10,6 +10,7 @@ module Obelisk.Command.Nix
1010
1111import qualified Data.ByteString.Lazy as LBS
1212import Data.Default
13+import Data.Monoid ((<>))
1314import qualified Data.Text as T
1415import qualified Data.Text.IO as T
1516import System.Exit (ExitCode (ExitSuccess))
@@ -62,7 +63,8 @@ nixBuild cfg = do
6263 { std_out = CreatePipe
6364 , std_err = CreatePipe
6465 }
65− withSpinner "Running nix-build ..." Nothing $ waitForProcess p >>= \case
66+ let msg = "Running nix-build [" <> _target_path (_nixBuildConfig_target cfg) <> "] ..."
67+ withSpinner msg Nothing $ waitForProcess p >>= \case
6668 ExitSuccess -> return ()
6769 _ -> do
6870 -- FIXME: We should interleave `out` and `err` in their original order?