From: Joey Hess Date: Mon, 11 Oct 2021 19:39:55 +0000 (-0400) Subject: fix duplicated commands in git-annex-shell usage display X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~79^2~158^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=afe5d9e137418ec2137af2d64f723e801b9a3067;p=git-annex.git fix duplicated commands in git-annex-shell usage display --- diff --git a/CmdLine/GitAnnexShell.hs b/CmdLine/GitAnnexShell.hs index ba4f402c16..aa952d18ad 100644 --- a/CmdLine/GitAnnexShell.hs +++ b/CmdLine/GitAnnexShell.hs @@ -1,6 +1,6 @@ {- git-annex-shell main program - - - Copyright 2010-2018 Joey Hess + - Copyright 2010-2021 Joey Hess - - 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 }