Skip to content

Fix/zsh count multiline#3521

Open
Dilyxs wants to merge 3 commits into
atuinsh:mainfrom
Dilyxs:fix/zsh-count-multiline
Open

Fix/zsh count multiline#3521
Dilyxs wants to merge 3 commits into
atuinsh:mainfrom
Dilyxs:fix/zsh-count-multiline

Conversation

@Dilyxs

@Dilyxs Dilyxs commented Jun 8, 2026

Copy link
Copy Markdown

Problem

when importing zsh_history, if there are multi-line commands, the progress bar displays an incorrect count. This happens because entries() counts physical lines via count_lines and not the commands.

Fix

.entries() now counts joined commands instead of lines.Same complexity, no extra traversal (it already walked the whole file)

Test plan

test_parse_file updated and passing; new test (test_count_lines_multiline does this check more explicitly)

Closes #3008

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Fossier: Manual Review Requested

@dilyxs is a new contributor. A maintainer should review this PR before merging.

Score Breakdown

Total Score: 65.1/100 | Confidence: 100% | Outcome: REVIEW

Signal Value Score Weight
account_age 1514 1.00 0.09
public_repos 22 1.00 0.05
contribution_history 22 0.11 0.05
follower_ratio 0.8 0.40 0.05
bot_signals False 0.50 0.04
open_prs_elsewhere 3 0.62 0.09
closed_prs_elsewhere 0 1.00 0.10
merged_prs_elsewhere 1 0.36 0.08
prior_interaction 1 0.33 0.08
activity_velocity 1 1.00 0.08
pr_content ... 1.00 0.08
commit_email no_email 0.50 0.04
pr_description ... 0.70 0.05
repo_stars 30087 0.30 0.04
org_membership 0 0.20 0.03
commit_verification ... 1.00 0.04
contributor_stars 0 0.00 0.04

@greptile-apps

greptile-apps Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates zsh history import counting for multiline commands. The main changes are:

  • Counts zsh entries after applying the same line-joining rule used during import.
  • Skips invalid unmetafied lines while counting, matching the load path.
  • Updates zsh importer tests for multiline command counts.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
crates/atuin-client/src/import/zsh.rs Updates Zsh::entries() so progress counts align with commands pushed by load() for continued lines.

Reviews (1): Last reviewed commit: "fix: fixed indentation for zsh" | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Import/ UI Count. Numbers mismatch

1 participant