remotes alias

This commit is contained in:
voidlizard 2025-02-20 06:15:43 +03:00
parent 8cecdc1e69
commit 74659bffc6
2 changed files with 12 additions and 6 deletions

View File

@ -5,6 +5,10 @@ import Data.Config.Suckless.Script
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 = brief "initializes a new repository"
. args [ arg "new repository flag" "--new"

View File

@ -63,7 +63,7 @@ theDict = do
where
myEntries = hidePrefixes ["test", "debug", "segment", "reflog:index"] do
myEntries = hidePrefixes ["test", "debug", "segment", "reflog:index", "tss"] do
entry $ bindMatch "--help" $ nil_ $ \case
HelpEntryBound what -> do
helpEntry what
@ -449,12 +449,14 @@ compression ; prints compression level
getRepoManifest >>= liftIO . print . pretty . mkForm "manifest" . coerce
entry $ bindMatch "repo:remotes" $ nil_ $ \syn -> lift do
manRemotes $ entry $ bindAlias "remotes" "repo:remotes"
remotes <- listRemotes
liftIO $ for_ remotes $ \(r,k) -> do
print $ fill 44 (pretty (AsBase58 k)) <+> pretty r
hidden $
manRemotes $
entry $ bindMatch "repo:remotes" $ nil_ $ const $ lift do
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
resolveRepoKeyThrow syn >>= setGitRepoKey