mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 20:51:52 -07:00
Shell: escape the string in the command line only
This commit is contained in:
@@ -49,6 +49,7 @@ data Shell = Shell
|
||||
|
||||
instance XPrompt Shell where
|
||||
showXPrompt Shell = "Run: "
|
||||
completionToCommand _ = escape
|
||||
|
||||
shellPrompt :: XPConfig -> X ()
|
||||
shellPrompt c = do
|
||||
@@ -85,7 +86,7 @@ getShellCompl cmds s | s == "" || last s == ' ' = return []
|
||||
if isDirectory fs then return [x ++ "/"]
|
||||
else return [x]
|
||||
_ -> return f
|
||||
return . map escape . uniqSort $ files ++ commandCompletionFunction cmds s
|
||||
return . uniqSort $ files ++ commandCompletionFunction cmds s
|
||||
|
||||
commandCompletionFunction :: [String] -> String -> [String]
|
||||
commandCompletionFunction cmds str | '/' `elem` str = []
|
||||
|
Reference in New Issue
Block a user