From 9a2f7c61cd95f0a854383499a1d55ac2d770557f Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Fri, 26 Oct 2007 23:19:56 +0200 Subject: ShellPrompt: reformat the comments to complay with the module style darcs-hash:20071026211956-32816-5c19f3ab7211bdd70702beb90a691b110684cb7b.gz --- ShellPrompt.hs | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'ShellPrompt.hs') diff --git a/ShellPrompt.hs b/ShellPrompt.hs index 0692244..406916c 100644 --- a/ShellPrompt.hs +++ b/ShellPrompt.hs @@ -57,14 +57,20 @@ shellPrompt c = do cmds <- io $ getCommands mkXPrompt Shell c (getShellCompl cmds) spawn -{- | See safe and unsafeSpawn. prompt is an alias for safePrompt; safePrompt and unsafePrompt work on the same principles, - but will use XPrompt to interactively query the user for input; the appearance is set by passing an XPConfig as the - second argument. The first argument is the program to be run with the interactive input. - You would use these like this: - > , ((modMask, xK_b ), safePrompt "firefox" greenXPConfig) - > , ((modMask .|. shiftMask, xK_c ), prompt ("xterm" ++ " -e") greenXPConfig) - Note that you want to use safePrompt for Firefox input, as Firefox wants URLs, and unsafePrompt for the XTerm example - because this allows you to easily start a terminal executing an arbitrary command, like 'top'. -} +-- | See safe and unsafeSpawn. prompt is an alias for safePrompt; +-- safePrompt and unsafePrompt work on the same principles, but will use +-- XPrompt to interactively query the user for input; the appearance is +-- set by passing an XPConfig as the second argument. The first argument +-- is the program to be run with the interactive input. +-- You would use these like this: +-- +-- > , ((modMask, xK_b ), safePrompt "firefox" greenXPConfig) +-- > , ((modMask .|. shiftMask, xK_c ), prompt ("xterm" ++ " -e") greenXPConfig) +-- +-- Note that you want to use safePrompt for Firefox input, as Firefox +-- wants URLs, and unsafePrompt for the XTerm example because this allows +-- you to easily start a terminal executing an arbitrary command, like +-- 'top'. prompt, unsafePrompt, safePrompt :: FilePath -> XPConfig -> X () prompt = unsafePrompt safePrompt c config = mkXPrompt Shell config (getShellCompl [c]) run -- cgit v1.2.3