aboutsummaryrefslogtreecommitdiffstats
path: root/WorkspaceDir.hs
diff options
context:
space:
mode:
Diffstat (limited to 'WorkspaceDir.hs')
-rw-r--r--WorkspaceDir.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/WorkspaceDir.hs b/WorkspaceDir.hs
index 32f548d..97e5f94 100644
--- a/WorkspaceDir.hs
+++ b/WorkspaceDir.hs
@@ -68,10 +68,8 @@ workspaceDir :: LayoutClass l a => String -> l a
workspaceDir s = ModifiedLayout (WorkspaceDir s)
scd :: String -> X ()
-scd x = do x' <- io (runProcessWithInput "bash" [] ("echo -n " ++ x) `catch` \_ -> return Nothing)
- case x' of
- Just newDir -> catchIO $ setCurrentDirectory newDir
- Nothing -> return ()
+scd x = do x' <- io (runProcessWithInput "bash" [] ("echo -n " ++ x) `catch` \_ -> return x)
+ catchIO $ setCurrentDirectory x'
changeDir :: XPConfig -> X ()
changeDir c = directoryPrompt c "Set working directory: " (sendMessage . Chdir)