From 0cb5a870007c8299f8788962bd7dfc0848794dc0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 6 Feb 2015 17:08:14 -0400 Subject: The file matching options are now only accepted by commands that can actually use them. --- CmdLine/Option.hs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'CmdLine/Option.hs') 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 = -- cgit v1.2.3