Answer prose round 1: mark the reading-cost item decision, split the rise rule's reasons, and say the trend counts since the last reset
This commit is contained in:
+2
-2
@@ -32,7 +32,7 @@ def shell_reads(command: str, cwd: str, home: str) -> Reads:
|
||||
|
||||
|
||||
def shell_lines(command: str) -> typing.Iterator[list[str]]:
|
||||
"""Each line's tokens, skipping a heredoc's body, which feeds a program rather than naming files."""
|
||||
"""Each line's tokens, skipping a heredoc's body, which feeds a program."""
|
||||
ends = None
|
||||
for line in command.splitlines():
|
||||
if ends is not None:
|
||||
@@ -56,7 +56,7 @@ def segments(tokens: list[str]) -> list[list[str]]:
|
||||
if target:
|
||||
target = False
|
||||
elif all(char in "();<>|&" for char in token):
|
||||
# A redirect's target is written or fed, not read by the command.
|
||||
# A redirect's target is not an operand, so it does not count as a read.
|
||||
target = "<" in token or ">" in token
|
||||
found.append([])
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user