Skip to content

Commit

Permalink
improve %pistol-extra% substitution (#59)
Browse files Browse the repository at this point in the history
Followup to #58.
  • Loading branch information
lucas-mior authored Apr 20, 2021
1 parent ac92b11 commit 0114927
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions previewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"io"
"os/exec"
"fmt"
// "fmt"
"strconv"
"strings"
"regexp"
Expand Down Expand Up @@ -176,7 +176,7 @@ func (p *Previewer) Write(w io.Writer) (error) {
if (err == nil && len(p.Extras) > auxInt) {
// substitute the %pistol-extra[#]% argument in the
// final CLI string.
current := fmt.Sprintf("%%pistol-extra%d%%", auxInt)
current := arg[loc[0]:loc[1]]
argAux = strings.ReplaceAll(argAux, current, p.Extras[auxInt])
} else {
continue
Expand Down

0 comments on commit 0114927

Please sign in to comment.