File size: 2,210 Bytes
9cf991c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
license: mit
task_categories:
  - text-generation
language:
  - en
tags:
  - shell
  - command-correction
  - benchmark
  - terminal
pretty_name: "mash-bench"
size_categories:
  - n<1K
---

# mash-bench

203 real-world shell-command **repair** scenarios for evaluating command
correction models — as of Aug 2026, the first benchmark for this task. Each
scenario is a wrong/garbled command as a human actually typed it, the stderr it
produced (187/203 have it), and one or more acceptable corrections.

```json
{"input": "cd..", "stderr": "-bash: cd..: command not found", "expected": ["cd .."], "source": "nofaq"}
{"input": "git brnch", "stderr": "git: 'brnch' is not a git command. See 'git --help'.", "expected": ["git branch"], "source": "thefuck"}
```

## Sources

- **nofaq** (139 scenarios) — the artifact of *NoFAQ: Synthesizing Command
  Repairs from Examples* (D'Antoni, Singh, Vaughn; ESEC/FSE 2017),
  [MichaelBVaughn/NoFAQ](https://github.com/MichaelBVaughn/NoFAQ), MIT.
  Extracted from `Synthesis/RuleRepair/TestExamples.fs`.
- **thefuck** (64 scenarios) — inputs, stderr, and fixes taken verbatim from
  the rule *test files* of [nvbn/thefuck](https://github.com/nvbn/thefuck)
  (MIT), spanning git typos, missing sudo, cd errors, package managers, and
  more.

Scenarios were deduped across sources; entries with fabricated-looking or
machine-state-dependent fixes were dropped; alternate corrections were added
only where genuinely equivalent. Full cleaning log in `PROVENANCE.md`.

## Scoring

Two modes matter:

- **bare input** — the model sees only the typed command. Fair for typo-class
  scenarios (most of `thefuck`).
- **with stderr** — the error text is appended to the input. Required for
  repair-class scenarios (most of `nofaq`), whose fixes depend on the error
  (`cd files``mkdir files; cd files` only given "no such file or
  directory").

Report both, per source. Exact match against any entry in `expected`
(whitespace-normalized) is the metric; it is conservative — functionally
equivalent alternative fixes count as misses unless listed.

Runner: [`training/bench.py`](https://github.com/lumpenspace/fash/blob/main/training/bench.py)
in the fash repo.