diff options
Diffstat (limited to 'ShellPrompt.hs')
-rw-r--r-- | ShellPrompt.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ShellPrompt.hs b/ShellPrompt.hs index d68d7cf..5a6aaf6 100644 --- a/ShellPrompt.hs +++ b/ShellPrompt.hs @@ -58,7 +58,7 @@ shellPrompt c = mkXPrompt Shell c getShellCompl spawn getShellCompl :: String -> IO [String] getShellCompl s | s /= "" && last s /= ' ' = do - f <- fmap lines $ runProcessWithInput "/bin/bash" [] ("compgen -A file " ++ s ++ "\n") + f <- fmap (lines . fromMaybe "") $ runProcessWithInput "/bin/bash" [] ("compgen -A file " ++ s ++ "\n") c <- commandCompletionFunction s hPutStrLn stdout s return $ map escape . sort . nub $ f ++ c |