Skip to content

Commit dbd1ac7

Browse files
author
James Brundage
committed
Adding [CommandAst].IsPipedTo/From (Fixes #266)
1 parent 427780a commit dbd1ac7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
if ($this.Parent -isnot [Management.Automation.Language.PipelineAst]) { return $false }
2+
$this.Parent.PipelineElements.IndexOf($this) -lt ($this.Parent.PipelineElements.Count - 1)

Types/CommandAST/get_IsPipedTo.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
if ($this.Parent -isnot [Management.Automation.Language.PipelineAst]) { return $false }
2+
$this.Parent.PipelineElements.IndexOf($this) -gt 0

0 commit comments

Comments
 (0)