Skip to content

Commit

Permalink
split: redirects should only be filtered for pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Aug 11, 2023
1 parent 517e083 commit cdf5db3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion action.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,15 @@ func (a Action) split(pipelines bool) Action {
return ActionMessage(err.Error())
}

var context Context
if pipelines {
tokens = tokens.CurrentPipeline()
context = NewContext(tokens.FilterRedirects().Words().Strings()...)
} else {
context = NewContext(tokens.Words().Strings()...)
}

originalValue := c.Value
context := NewContext(tokens.FilterRedirects().Words().Strings()...)
prefix := originalValue[:tokens.Words().CurrentToken().Index]
c.Args = context.Args
c.Parts = []string{}
Expand Down

0 comments on commit cdf5db3

Please sign in to comment.