aboutsummaryrefslogtreecommitdiff
path: root/CmdLine/Option.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-02-06 17:08:14 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-02-06 17:16:41 -0400
commit0cb5a870007c8299f8788962bd7dfc0848794dc0 (patch)
tree43d9d70f436a42f055617df6abdf85972045476b /CmdLine/Option.hs
parent7d9431ef1b0cff4eece3cd8fc03e429e391d724a (diff)
The file matching options are now only accepted by commands that can actually use them.
Diffstat (limited to 'CmdLine/Option.hs')
-rw-r--r--CmdLine/Option.hs15
1 files changed, 1 insertions, 14 deletions
diff --git a/CmdLine/Option.hs b/CmdLine/Option.hs
index 1c1331aab..1b82dc83e 100644
--- a/CmdLine/Option.hs
+++ b/CmdLine/Option.hs
@@ -7,7 +7,6 @@
module CmdLine.Option (
commonOptions,
- matcherOptions,
flagOption,
fieldOption,
optionName,
@@ -21,9 +20,9 @@ import Common.Annex
import qualified Annex
import Types.Messages
import Types.DesktopNotify
-import Limit
import CmdLine.Usage
+-- Options accepted by both git-annex and git-annex-shell sub-commands.
commonOptions :: [Option]
commonOptions =
[ Option [] ["force"] (NoArg (setforce True))
@@ -56,18 +55,6 @@ commonOptions =
unsetdebug = Annex.changeGitConfig $ \c -> c { annexDebug = False }
setdesktopnotify v = Annex.changeState $ \s -> s { Annex.desktopnotify = Annex.desktopnotify s <> v }
-matcherOptions :: [Option]
-matcherOptions =
- [ longopt "not" "negate next option"
- , longopt "and" "both previous and next option must match"
- , longopt "or" "either previous or next option must match"
- , shortopt "(" "open group of options"
- , shortopt ")" "close group of options"
- ]
- where
- longopt o = Option [] [o] $ NoArg $ addToken o
- shortopt o = Option o [] $ NoArg $ addToken o
-
{- An option that sets a flag. -}
flagOption :: String -> String -> String -> Option
flagOption short opt description =