Skip to content

feat: add command aliases for stats#3508

Open
erics118 wants to merge 2 commits into
atuinsh:mainfrom
erics118:stats-command-aliases
Open

feat: add command aliases for stats#3508
erics118 wants to merge 2 commits into
atuinsh:mainfrom
erics118:stats-command-aliases

Conversation

@erics118

@erics118 erics118 commented May 28, 2026

Copy link
Copy Markdown

add to config like this:

[stats.command_aliases]
"g" = "git"
"dune te" = "dune runtest"
"dune test" = "dune runtest"

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

closes #2458

add to config like this:
[stats.command_aliases]
"g" = "git"
etc...
@github-actions

Copy link
Copy Markdown
Contributor

Fossier: Manual Review Requested

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

Score Breakdown

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

Signal Value Score Weight
account_age 2517 1.00 0.09
public_repos 48 1.00 0.05
contribution_history 48 0.24 0.05
follower_ratio 1.09 0.55 0.05
bot_signals False 0.50 0.04
open_prs_elsewhere 5 0.38 0.09
closed_prs_elsewhere 5 0.50 0.10
merged_prs_elsewhere 45 1.00 0.08
prior_interaction 0 0.00 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 29907 0.30 0.04
org_membership 0 0.20 0.03
commit_verification ... 1.00 0.04
contributor_stars 10 0.20 0.04

@greptile-apps

greptile-apps Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds configurable command aliases to stats calculation. It changes:

  • Adds stats.command_aliases to client settings with a default empty map.
  • Resolves configured aliases before stats grouping.
  • Applies alias resolution to pipeline segments used for command ngrams.
  • Keeps unique command counting for full commands and split pipeline parts.

Confidence Score: 4/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
crates/atuin-client/src/settings.rs Adds the new alias map to stats configuration with serde and default support.
crates/atuin-history/src/stats.rs Adds alias resolution to stats computation and pipeline segment handling.

Reviews (2): Last reviewed commit: "fix: piped aliases, and count full comma..." | Re-trigger Greptile

Comment thread crates/atuin-history/src/stats.rs
Comment thread crates/atuin-history/src/stats.rs
Comment thread crates/atuin-history/src/stats.rs
@erics118

Copy link
Copy Markdown
Author

@greptileai

@erics118

Copy link
Copy Markdown
Author

nix fails due to an old version of nixpkgs not using a custom UA to prevent ratelimiting from crates.io. running nix flake update nixpkgs fixes the issue.

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.

[Feature Request] ability to define aliases for stats

1 participant