mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-08 16:01:53 -07:00
P.Shell documentation and add missing unsafePrompt export
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
This commit is contained in:
@@ -15,13 +15,18 @@ module XMonad.Prompt.Shell
|
|||||||
-- $usage
|
-- $usage
|
||||||
Shell (..)
|
Shell (..)
|
||||||
, shellPrompt
|
, shellPrompt
|
||||||
|
-- ** Variations on shellPrompt
|
||||||
|
-- $spawns
|
||||||
|
, prompt
|
||||||
|
, safePrompt
|
||||||
|
, unsafePrompt
|
||||||
|
|
||||||
|
-- * Utility functions
|
||||||
, getCommands
|
, getCommands
|
||||||
, getBrowser
|
, getBrowser
|
||||||
, getEditor
|
, getEditor
|
||||||
, getShellCompl
|
, getShellCompl
|
||||||
, split
|
, split
|
||||||
, prompt
|
|
||||||
, safePrompt
|
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Codec.Binary.UTF8.String (encodeString)
|
import Codec.Binary.UTF8.String (encodeString)
|
||||||
@@ -64,7 +69,9 @@ shellPrompt c = do
|
|||||||
cmds <- io getCommands
|
cmds <- io getCommands
|
||||||
mkXPrompt Shell c (getShellCompl cmds) spawn
|
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
|
safePrompt and unsafePrompt work on the same principles, but will use
|
||||||
XPrompt to interactively query the user for input; the appearance is
|
XPrompt to interactively query the user for input; the appearance is
|
||||||
set by passing an XPConfig as the second argument. The first argument
|
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
|
wants URLs, and unsafePrompt for the XTerm example because this allows
|
||||||
you to easily start a terminal executing an arbitrary command, like
|
you to easily start a terminal executing an arbitrary command, like
|
||||||
'top'. -}
|
'top'. -}
|
||||||
|
|
||||||
prompt, unsafePrompt, safePrompt :: FilePath -> XPConfig -> X ()
|
prompt, unsafePrompt, safePrompt :: FilePath -> XPConfig -> X ()
|
||||||
prompt = unsafePrompt
|
prompt = unsafePrompt
|
||||||
safePrompt c config = mkXPrompt Shell config (getShellCompl [c]) run
|
safePrompt c config = mkXPrompt Shell config (getShellCompl [c]) run
|
||||||
|
Reference in New Issue
Block a user