From afe5d9e137418ec2137af2d64f723e801b9a3067 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 11 Oct 2021 15:39:55 -0400 Subject: [PATCH] fix duplicated commands in git-annex-shell usage display --- CmdLine/GitAnnexShell.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 } -- 2.30.2