mirror of https://github.com/voidlizard/hbs2
remotes alias
This commit is contained in:
parent
8cecdc1e69
commit
74659bffc6
|
@ -5,6 +5,10 @@ import Data.Config.Suckless.Script
|
||||||
|
|
||||||
import Text.InterpolatedString.Perl6 (qc)
|
import Text.InterpolatedString.Perl6 (qc)
|
||||||
|
|
||||||
|
manRemotes :: MakeDictM c m () -> MakeDictM c m ()
|
||||||
|
manRemotes = brief "show known hbs2-git remotes"
|
||||||
|
|
||||||
|
|
||||||
manInit :: MakeDictM c m () -> MakeDictM c m ()
|
manInit :: MakeDictM c m () -> MakeDictM c m ()
|
||||||
manInit = brief "initializes a new repository"
|
manInit = brief "initializes a new repository"
|
||||||
. args [ arg "new repository flag" "--new"
|
. args [ arg "new repository flag" "--new"
|
||||||
|
|
|
@ -63,7 +63,7 @@ theDict = do
|
||||||
|
|
||||||
where
|
where
|
||||||
|
|
||||||
myEntries = hidePrefixes ["test", "debug", "segment", "reflog:index"] do
|
myEntries = hidePrefixes ["test", "debug", "segment", "reflog:index", "tss"] do
|
||||||
entry $ bindMatch "--help" $ nil_ $ \case
|
entry $ bindMatch "--help" $ nil_ $ \case
|
||||||
HelpEntryBound what -> do
|
HelpEntryBound what -> do
|
||||||
helpEntry what
|
helpEntry what
|
||||||
|
@ -449,12 +449,14 @@ compression ; prints compression level
|
||||||
|
|
||||||
getRepoManifest >>= liftIO . print . pretty . mkForm "manifest" . coerce
|
getRepoManifest >>= liftIO . print . pretty . mkForm "manifest" . coerce
|
||||||
|
|
||||||
entry $ bindMatch "repo:remotes" $ nil_ $ \syn -> lift do
|
manRemotes $ entry $ bindAlias "remotes" "repo:remotes"
|
||||||
|
|
||||||
remotes <- listRemotes
|
hidden $
|
||||||
|
manRemotes $
|
||||||
liftIO $ for_ remotes $ \(r,k) -> do
|
entry $ bindMatch "repo:remotes" $ nil_ $ const $ lift do
|
||||||
print $ fill 44 (pretty (AsBase58 k)) <+> pretty r
|
remotes <- listRemotes
|
||||||
|
liftIO $ for_ remotes $ \(r,k) -> do
|
||||||
|
print $ fill 44 (pretty (AsBase58 k)) <+> pretty r
|
||||||
|
|
||||||
entry $ bindMatch "reflog:imported" $ nil_ $ \syn -> lift $ connectedDo do
|
entry $ bindMatch "reflog:imported" $ nil_ $ \syn -> lift $ connectedDo do
|
||||||
resolveRepoKeyThrow syn >>= setGitRepoKey
|
resolveRepoKeyThrow syn >>= setGitRepoKey
|
||||||
|
|
Loading…
Reference in New Issue