Skip to content

Commit

Permalink
Merge #1459
Browse files Browse the repository at this point in the history
1459: More Bash autocompletion in Byron and Node CLI r=dcoutts a=intricate



Co-authored-by: Luke Nadur <[email protected]>
  • Loading branch information
iohk-bors[bot] and intricate authored Jul 14, 2020
2 parents f72ff6a + d22cad7 commit 3fb8ae1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions cardano-cli/src/Cardano/CLI/Byron/Parsers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ parseTxRelatedValues =

parseVerificationKeyFile :: String -> String -> Parser VerificationKeyFile
parseVerificationKeyFile opt desc = VerificationKeyFile <$> parseFilePath opt desc

pNodeCmd :: Parser NodeCmd
pNodeCmd =
Opt.subparser $
Expand Down
8 changes: 7 additions & 1 deletion cardano-config/src/Cardano/Config/Parsers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ parseDbPath =
( long "database-path"
<> metavar "FILEPATH"
<> help "Directory where the state is stored."
<> completer (bashCompleter "file")
)


Expand All @@ -74,7 +75,12 @@ parseGenesisFile opt =

parseFilePath :: String -> String -> Parser FilePath
parseFilePath optname desc =
strOption $ long optname <> metavar "FILEPATH" <> help desc
strOption
( long optname
<> metavar "FILEPATH"
<> help desc
<> completer (bashCompleter "file")
)

parseFraction :: String -> String -> Parser Rational
parseFraction optname desc =
Expand Down
6 changes: 6 additions & 0 deletions cardano-node/src/Cardano/Node/Parsers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ parseTopologyFile =
long "topology"
<> metavar "FILEPATH"
<> help "The path to a file describing the topology."
<> completer (bashCompleter "file")
)

parseDelegationCert :: Parser FilePath
Expand All @@ -159,6 +160,7 @@ parseDelegationCert =
( long "delegation-certificate"
<> metavar "FILEPATH"
<> help "Path to the delegation certificate."
<> completer (bashCompleter "file")
)

parseSigningKey :: Parser FilePath
Expand All @@ -167,6 +169,7 @@ parseSigningKey =
( long "signing-key"
<> metavar "FILEPATH"
<> help "Path to the signing key."
<> completer (bashCompleter "file")
)

parseOperationalCertFilePath :: Parser FilePath
Expand All @@ -175,6 +178,7 @@ parseOperationalCertFilePath =
( long "shelley-operational-certificate"
<> metavar "FILEPATH"
<> help "Path to the delegation certificate."
<> completer (bashCompleter "file")
)

--TODO: pass the current KES evolution, not the KES_0
Expand All @@ -184,6 +188,7 @@ parseKesKeyFilePath =
( long "shelley-kes-key"
<> metavar "FILEPATH"
<> help "Path to the KES signing key."
<> completer (bashCompleter "file")
)

parseVrfKeyFilePath :: Parser FilePath
Expand All @@ -192,4 +197,5 @@ parseVrfKeyFilePath =
( long "shelley-vrf-key"
<> metavar "FILEPATH"
<> help "Path to the VRF signing key."
<> completer (bashCompleter "file")
)

0 comments on commit 3fb8ae1

Please sign in to comment.