fix duplicated commands in git-annex-shell usage display

This commit is contained in:
Joey Hess 2021-10-11 15:39:55 -04:00
parent 7bdc7350a5
commit afe5d9e137
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -1,6 +1,6 @@
{- git-annex-shell main program
-
- Copyright 2010-2018 Joey Hess <id@joeyh.name>
- Copyright 2010-2021 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU AGPL version 3 or higher.
-}
@ -49,7 +49,7 @@ cmdsMap = M.fromList $ map mk
appendcmds = readonlycmds ++ map addGlobalOptions
[ gitAnnexShellCheck Command.RecvKey.cmd
]
allcmds = map addGlobalOptions
allcmds = appendcmds ++ map addGlobalOptions
[ gitAnnexShellCheck Command.DropKey.cmd
, Command.GCryptSetup.cmd
]
@ -61,7 +61,7 @@ cmdsFor :: ServerMode -> [Command]
cmdsFor = fromMaybe [] . flip M.lookup cmdsMap
cmdsList :: [Command]
cmdsList = concat $ M.elems cmdsMap
cmdsList = nub $ concat $ M.elems cmdsMap
addGlobalOptions :: Command -> Command
addGlobalOptions c = c { cmdglobaloptions = globalOptions ++ cmdglobaloptions c }