diff options
author | Tim Horton <tmhorton@gmail.com> | 2009-12-24 04:32:17 +0100 |
---|---|---|
committer | Tim Horton <tmhorton@gmail.com> | 2009-12-24 04:32:17 +0100 |
commit | 070834fa567272fc5a4d72571eb9eec161949cc6 (patch) | |
tree | a825ddf24b69f9d0be61512b3338a0f0bff135c4 /XMonad/Prompt | |
parent | 4e595fa100dca772a97a7c39d8c339a5428e0bb8 (diff) | |
download | XMonadContrib-070834fa567272fc5a4d72571eb9eec161949cc6.tar.gz XMonadContrib-070834fa567272fc5a4d72571eb9eec161949cc6.tar.xz XMonadContrib-070834fa567272fc5a4d72571eb9eec161949cc6.zip |
X.P.Shell, filter empty string from PATH
Ignore-this: 1aec55452f917d0be2bff7fcf5937766
doesDirectoryExist returns True if given an empty string using ghc <
darcs-hash:20091224033217-1db5e-f87f8470346c2684d5b324048320e15f50f30377.gz
Diffstat (limited to 'XMonad/Prompt')
-rw-r--r-- | XMonad/Prompt/Shell.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/XMonad/Prompt/Shell.hs b/XMonad/Prompt/Shell.hs index 574fe28..b7da249 100644 --- a/XMonad/Prompt/Shell.hs +++ b/XMonad/Prompt/Shell.hs @@ -99,7 +99,7 @@ commandCompletionFunction cmds str | '/' `elem` str = [] getCommands :: IO [String] getCommands = do p <- getEnv "PATH" `catch` const (return []) - let ds = split ':' p + let ds = filter (/= "") $ split ':' p es <- forM ds $ \d -> do exists <- doesDirectoryExist d if exists |