diff options
author | c.lopez <c.lopez@kmels.net> | 2013-02-09 20:04:56 +0100 |
---|---|---|
committer | c.lopez <c.lopez@kmels.net> | 2013-02-09 20:04:56 +0100 |
commit | 8ddbb295aabb24362c49dd368b64a08cd48c3aa9 (patch) | |
tree | e66a7f5efc3cb28964502b17ab1a8eddd1cea0a5 | |
parent | b9a41641366da55cec06620c9d42f46357d154d3 (diff) | |
download | XMonadContrib-8ddbb295aabb24362c49dd368b64a08cd48c3aa9.tar.gz XMonadContrib-8ddbb295aabb24362c49dd368b64a08cd48c3aa9.tar.xz XMonadContrib-8ddbb295aabb24362c49dd368b64a08cd48c3aa9.zip |
spawn command when no completion is available (if alwaysHighlight is True); changes commandToComplete in Prompt/Shell to complete the whole word instead of using getLastWord
Ignore-this: ca7d354bb301b555b64d5e76e31d10e8
darcs-hash:20130209190456-c3db2-5bb4a8a2aa97c180814ca90a090054efc36d4cfe.gz
-rw-r--r-- | XMonad/Prompt.hs | 3 | ||||
-rw-r--r-- | XMonad/Prompt/Shell.hs | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/XMonad/Prompt.hs b/XMonad/Prompt.hs index 87d4498..d6b44eb 100644 --- a/XMonad/Prompt.hs +++ b/XMonad/Prompt.hs @@ -193,7 +193,6 @@ class XPrompt t where -- | This method is used to generate the string to be passed to -- the completion function. - -- This function is not used when in multiple modes (because alwaysHighlight in XPConfig is True) commandToComplete :: t -> String -> String commandToComplete _ = getLastWord @@ -367,7 +366,7 @@ mkXPromptWithReturn t conf compl action = do --When it is false, it is handled depending on the prompt buffer's value let selectedCompletion = case alwaysHighlight (config st') of False -> command st' - True -> fromMaybe "" $ highlightedCompl st' + True -> fromMaybe (command st') $ highlightedCompl st' -- Just <$> action selectedCompletion else return Nothing diff --git a/XMonad/Prompt/Shell.hs b/XMonad/Prompt/Shell.hs index 05ee5f4..93308bc 100644 --- a/XMonad/Prompt/Shell.hs +++ b/XMonad/Prompt/Shell.hs @@ -62,6 +62,7 @@ data Shell = Shell instance XPrompt Shell where showXPrompt Shell = "Run: " completionToCommand _ = escape + commandToComplete _ c = c shellPrompt :: XPConfig -> X () shellPrompt c = do |