rename strArr to split
This commit is contained in:
parent
0ce8614729
commit
cad02f7b66
1 changed files with 4 additions and 4 deletions
|
@ -22,14 +22,14 @@ func Display(displayer Displayer, noColor bool, pagerCommand string) {
|
|||
return
|
||||
}
|
||||
|
||||
strArr := strings.Split(pagerCommand, " ")
|
||||
split := strings.Split(pagerCommand, " ")
|
||||
|
||||
pager := new(exec.Cmd)
|
||||
|
||||
if len(strArr) == 1 {
|
||||
pager = exec.Command(strArr[0]) //nolint:gosec
|
||||
if len(split) == 1 {
|
||||
pager = exec.Command(split[0]) //nolint:gosec
|
||||
} else {
|
||||
pager = exec.Command(strArr[0], strArr[1:]...) //nolint:gosec
|
||||
pager = exec.Command(split[0], split[1:]...) //nolint:gosec
|
||||
}
|
||||
|
||||
pipe, err := pager.StdinPipe()
|
||||
|
|
Loading…
Reference in a new issue