aboutsummaryrefslogtreecommitdiff
path: root/Command/Sync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-09-14 13:19:04 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-09-14 13:19:04 -0400
commitd8bc62fed9ae2e85235fde7a6cba5f522daf6014 (patch)
treee4060fe221ab3dcb6ab2223e031987df6bfb7dbe /Command/Sync.hs
parente323354b4ca2a44baae8223b9dd47aaab234a56a (diff)
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
Diffstat (limited to 'Command/Sync.hs')
-rw-r--r--Command/Sync.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs
index 4e6bf11d7..19a984300 100644
--- a/Command/Sync.hs
+++ b/Command/Sync.hs
@@ -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"
)