You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: unison-cli/src/Unison/CommandLine/InputPatterns.hs
+23-5Lines changed: 23 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -684,6 +684,14 @@ handleNameSegmentArg arg = do
684
684
-- output them as numbered output.
685
685
I.StructuredArg _ ->Left"Expected a name segment"
686
686
687
+
--| Just a single simple name segment. Useful for lib names, etc.
688
+
handleTextArg::I.Argument->Either (P.PrettyCT.ColorText) Text
689
+
handleTextArg arg =do
690
+
case arg of
691
+
I.RawArg txt ->pure$Text.pack txt
692
+
-- There are no valid structured args for a raw text arg
693
+
I.StructuredArg _ ->Left"Expected a text argument"
694
+
687
695
handleNameArg::I.Argument->Either (P.PrettyCT.ColorText) Name
688
696
handleNameArg =\case
689
697
I.RawArg raw -> first P.text .Name.parseTextEither .Text.pack $ raw
@@ -1758,22 +1766,32 @@ historyComment =
1758
1766
"history.comment"
1759
1767
["comment", "comment.history"]
1760
1768
I.Visible
1761
-
(Parameters[]$Optional [("hash or branch to create a comment after", namespaceOrProjectBranchArg config)] Nothing)
1769
+
(Parameters[]$Optional [("hash or branch to create a comment after", namespaceOrProjectBranchArg config), ("comment message", noCompletionsArg)] Nothing)
1762
1770
( P.wrapColumn2
1763
1771
[ ( makeExample historyComment [],
1764
1772
"Creates a comment after the head of the current branch."
1765
1773
),
1766
-
( makeExample historyComment ["/main"],
1774
+
( makeExample historyComment ["/main:"],
1767
1775
"Creates a comment after the head of the `main` branch."
0 commit comments