Improve bash completion, so it completes names of remotes and backends in appropriate places.
Not necessarily everywhere, but a lot of the most often used places. Re the use of .Internal, see https://github.com/pcapriotti/optparse-applicative/issues/155
This commit is contained in:
parent
ffa8221517
commit
3f47d1b351
5 changed files with 32 additions and 2 deletions
|
@ -46,6 +46,7 @@ parseDropFromOption :: Parser (DeferredParse Remote)
|
|||
parseDropFromOption = parseRemoteOption $ strOption
|
||||
( long "from" <> short 'f' <> metavar paramRemote
|
||||
<> help "drop content from a remote"
|
||||
<> completeRemotes
|
||||
)
|
||||
|
||||
seek :: DropOptions -> CommandSeek
|
||||
|
|
|
@ -67,6 +67,7 @@ optParser desc = FsckOptions
|
|||
<*> optional (parseRemoteOption $ strOption
|
||||
( long "from" <> short 'f' <> metavar paramRemote
|
||||
<> help "check remote"
|
||||
<> completeRemotes
|
||||
))
|
||||
<*> optional parseincremental
|
||||
<*> optional (parseKeyOptions False)
|
||||
|
|
|
@ -70,7 +70,10 @@ data SyncOptions = SyncOptions
|
|||
|
||||
optParser :: CmdParamsDesc -> Parser SyncOptions
|
||||
optParser desc = SyncOptions
|
||||
<$> cmdParams desc
|
||||
<$> (many $ argument str
|
||||
( metavar desc
|
||||
<> completeRemotes
|
||||
))
|
||||
<*> invertableSwitch "commit" True
|
||||
( help "avoid git commit"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue