Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ generate-restic:
$(RESTIC_GEN) --install $(RESTIC_DIR)0.14.0 --version=0.14.0 --commands $(RESTIC_CMD)
$(RESTIC_GEN) --install $(RESTIC_DIR)0.15.0 --version=0.15.0 --commands $(RESTIC_CMD)
$(RESTIC_GEN) --install $(RESTIC_DIR)0.16.0 --version=0.16.0 --commands $(RESTIC_CMD)
$(RESTIC_GEN) --install $(RESTIC_DIR)0.16.1 --version=0.16.1 --commands $(RESTIC_CMD)
$(RESTIC_GEN) --install $(RESTIC_DIR)0.16.4 --version=0.16.4 --commands $(RESTIC_CMD)
$(RESTIC_GEN) --install $(RESTIC_DIR)0.17.0 --version=0.17.0 --commands $(RESTIC_CMD)

cp $(RESTIC_CMD) restic/commands.json

Expand Down
1 change: 1 addition & 0 deletions constants/parameter.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ const (
ParameterPasswordFile = "password-file"
ParameterPasswordCommand = "password-command"
ParameterKeyHint = "key-hint"
StdinFromCommand = "stdin-from-command"
)
2 changes: 2 additions & 0 deletions restic/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ var (
manSectionStart = regexp.MustCompile(`^\.SH ([A-Z 0-9]+)$`)
manParagraphStart = regexp.MustCompile(`^\.PP$`)
manEscapeSequence = regexp.MustCompile(`(\\f[A-Z]|\\)`)
lineCleanup = regexp.MustCompile("([`]{2,})")
)

func parseStream(input io.Reader, commandName string) (cmd *command, err error) {
Expand Down Expand Up @@ -182,6 +183,7 @@ func parseStream(input io.Reader, commandName string) (cmd *command, err error)
}
} else {
line = manEscapeSequence.ReplaceAllString(line, "")
line = lineCleanup.ReplaceAllString(line, "")

switch section {
case "DESCRIPTION":
Expand Down
Loading