aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apps/SetEnv.hs
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-07-18 00:17:44 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-07-18 00:17:44 +0300
commit427ae9ad54492954578cafbfcd2d815a084e0986 (patch)
treee81cdbf3b9f4d06c921f81a08264b214381d3c8a /apps/SetEnv.hs
parentrefactoring (diff)
downloadwindows-env-427ae9ad54492954578cafbfcd2d815a084e0986.tar.gz
windows-env-427ae9ad54492954578cafbfcd2d815a084e0986.zip
put modules to 'Windows'
Diffstat (limited to 'apps/SetEnv.hs')
-rw-r--r--apps/SetEnv.hs15
1 files changed, 7 insertions, 8 deletions
diff --git a/apps/SetEnv.hs b/apps/SetEnv.hs
index 0b95176..a48fbe6 100644
--- a/apps/SetEnv.hs
+++ b/apps/SetEnv.hs
@@ -8,17 +8,16 @@ module Main (main) where
import Control.Monad (void)
-import Options.Applicative hiding (value)
-
-import qualified Environment
+import Options.Applicative
+import qualified Windows.Environment as Env
import qualified Utils
data Options = Options
{ optYes :: Bool
, optGlobal :: Bool
- , optName :: Environment.VarName
- , optValue :: Environment.VarValue
+ , optName :: Env.VarName
+ , optValue :: Env.VarValue
} deriving (Eq, Show)
options :: Parser Options
@@ -48,7 +47,7 @@ main = execParser parser >>= setEnv
fullDesc <> progDesc "Set environment variable"
setEnv :: Options -> IO ()
-setEnv options = void $ prompt confirmationBanner $ Environment.engrave profile varName varValue
+setEnv options = void $ prompt confirmationBanner $ Env.engrave profile varName varValue
where
confirmationBanner = Utils.engraveBanner profile varName Nothing varValue
@@ -57,8 +56,8 @@ setEnv options = void $ prompt confirmationBanner $ Environment.engrave profile
forAllUsers = optGlobal options
profile = if forAllUsers
- then Environment.AllUsers
- else Environment.CurrentUser
+ then Env.AllUsers
+ else Env.CurrentUser
skipPrompt = optYes options
prompt = if skipPrompt