aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apps/UnsetEnv.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/UnsetEnv.hs
parentrefactoring (diff)
downloadwindows-env-427ae9ad54492954578cafbfcd2d815a084e0986.tar.gz
windows-env-427ae9ad54492954578cafbfcd2d815a084e0986.zip
put modules to 'Windows'
Diffstat (limited to 'apps/UnsetEnv.hs')
-rw-r--r--apps/UnsetEnv.hs13
1 files changed, 6 insertions, 7 deletions
diff --git a/apps/UnsetEnv.hs b/apps/UnsetEnv.hs
index b0ed96a..88101d9 100644
--- a/apps/UnsetEnv.hs
+++ b/apps/UnsetEnv.hs
@@ -8,16 +8,15 @@ module Main (main) where
import Control.Monad (void)
-import Options.Applicative
-
-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
+ , optName :: Env.VarName
} deriving (Eq, Show)
options :: Parser Options
@@ -43,7 +42,7 @@ main = execParser parser >>= unsetEnv
fullDesc <> progDesc "Unset environment variable"
unsetEnv :: Options -> IO ()
-unsetEnv options = void $ prompt confirmationBanner $ Environment.wipe profile varName
+unsetEnv options = void $ prompt confirmationBanner $ Env.wipe profile varName
where
confirmationBanner = Utils.wipeBanner profile varName
@@ -51,8 +50,8 @@ unsetEnv options = void $ prompt confirmationBanner $ Environment.wipe profile v
forAllUsers = optGlobal options
profile = if forAllUsers
- then Environment.AllUsers
- else Environment.CurrentUser
+ then Env.AllUsers
+ else Env.CurrentUser
skipPrompt = optYes options
prompt = if skipPrompt