Skip to content

Commit

Permalink
add export list to Commands module
Browse files Browse the repository at this point in the history
darcs-hash:20070131172040-f399b-63ed7bddd2de55fb342c259595fc18ecb45f33fc
  • Loading branch information
robdockins committed Jan 31, 2007
1 parent 8da86be commit 2d476ab
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/System/Console/Shell/Commands.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,34 @@
-
-}

module System.Console.Shell.Commands where
module System.Console.Shell.Commands
( File (..)
, Username (..)
, Completable (..)
, Completion (..)
, showShellHelp
, showCmdHelp
, helpCommand
, exitCommand
, toggle
, cmd
, CommandFunction
, maybePrefix
, getShellCommands
, commandsRegex
) where

import System.Console.Shell.Types
import System.Console.Shell.PPrint
import System.Console.Shell.Regex
import System.Console.Shell.ShellMonad


maybePrefix :: ShellDescription st -> String
maybePrefix desc = case commandStyle desc of CharPrefixCommands x -> [x]; _ -> ""

getShellCommands :: ShellDescription st -> [(String,CommandParser st,Doc,Doc)]
getShellCommands desc = map ($ desc) (shellCommands desc)


-- | Represents a command argument which is a filename
newtype File = File String

Expand Down

0 comments on commit 2d476ab

Please sign in to comment.