From 8e4cf4b10bc61138c0342fdf70479630ab7fdb9b Mon Sep 17 00:00:00 2001 From: Adam Vogt Date: Wed, 7 Dec 2011 17:39:51 +0100 Subject: P.Shell documentation and add missing unsafePrompt export Ignore-this: a03992ffdc9c1a0f5bfa6dafc453b587 Haddock (version 2.9.2 at least) does not attach documentation to any of a b or c when given: -- | documentation a,b,c :: X darcs-hash:20111207163951-1499c-63c977052b16fcd79857712ac39bd155cb6461d1.gz --- XMonad/Prompt/Shell.hs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'XMonad/Prompt/Shell.hs') diff --git a/XMonad/Prompt/Shell.hs b/XMonad/Prompt/Shell.hs index 49b12f7..d8aa272 100644 --- a/XMonad/Prompt/Shell.hs +++ b/XMonad/Prompt/Shell.hs @@ -15,13 +15,18 @@ module XMonad.Prompt.Shell -- $usage Shell (..) , shellPrompt + -- ** Variations on shellPrompt + -- $spawns + , prompt + , safePrompt + , unsafePrompt + + -- * Utility functions , getCommands , getBrowser , getEditor , getShellCompl , split - , prompt - , safePrompt ) where import Codec.Binary.UTF8.String (encodeString) @@ -64,7 +69,9 @@ shellPrompt c = do cmds <- io getCommands mkXPrompt Shell c (getShellCompl cmds) spawn -{- | See safe and unsafeSpawn. prompt is an alias for safePrompt; +{- $spawns + See safe and unsafeSpawn in "XMonad.Util.Run". + 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 @@ -78,6 +85,7 @@ shellPrompt c = do 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