mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-16 04:33:57 -07:00
XPrompt.hs: getCompletion should check for completions of the last word of the command line
This commit is contained in:
@@ -396,7 +396,7 @@ printPrompt drw gc fontst = do
|
|||||||
getCompletions :: XP [String]
|
getCompletions :: XP [String]
|
||||||
getCompletions = do
|
getCompletions = do
|
||||||
s <- get
|
s <- get
|
||||||
io $ (completionFunction s) (command s)
|
io $ (completionFunction s) (getLastWord $ command s)
|
||||||
|
|
||||||
setComplWin :: Window -> ComplWindowDim -> XP ()
|
setComplWin :: Window -> ComplWindowDim -> XP ()
|
||||||
setComplWin w wi =
|
setComplWin w wi =
|
||||||
@@ -555,7 +555,7 @@ readHistory = do
|
|||||||
return ([],h)
|
return ([],h)
|
||||||
|
|
||||||
writeHistory :: Handle -> [History] -> IO ()
|
writeHistory :: Handle -> [History] -> IO ()
|
||||||
writeHistory h hist = do
|
writeHistory _ hist = do
|
||||||
home <- getEnv "HOME"
|
home <- getEnv "HOME"
|
||||||
let path = home ++ "/.xmonad_history"
|
let path = home ++ "/.xmonad_history"
|
||||||
catch (writeFile path (show hist)) (\_ -> do putStrLn "error in writing"; return ())
|
catch (writeFile path (show hist)) (\_ -> do putStrLn "error in writing"; return ())
|
||||||
|
Reference in New Issue
Block a user