Commit Graph

6 Commits

Author SHA1 Message Date
Alexander 1d3e4b7e8a Guess mistyped commands from $PATH before asking the user
When no learned correction matches, fuzzy-match the mistyped token
against executables from $PATH and shell aliases. A guess is auto-run
and recorded into the learned-corrections db only when it is
unambiguous: the token is not an existing executable, contains no
path separators or extensions, shares its first character with the
candidate, has similarity of at least 0.8, and exactly one candidate
survives. Asking the user stays the last resort.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-13 20:01:22 +02:00
Alexander 8d2f7d13c7 Add dynamic learning from accepted corrections
Record user-accepted corrections in a shelve-backed store and replay
them on future matching mistakes, bypassing rule evaluation entirely.

Two-level matching: exact full-command lookup, then word-level
reconstruction that generalises to different arguments (e.g. learning
'git psuh origin main' also fixes 'git psuh origin dev').
2026-04-15 12:06:41 +02:00
Joris Hartog 0f4a523dc4 Encapsulate force_command in _get_raw_command
Using the `force_command` argument will run into issues as the
`_get_raw_command` method simply returns the value of `force_command`
(which is a string) while it should actually return a list.

Fix #1240
2021-12-20 00:05:47 +01:00
Pablo Santiago Blum de Aguiar 58ddd4338a #1215: Initiate settings before printing the alias 2021-07-21 13:09:19 +02:00
Vladimir Iakovlev 4875d75a64 #682: Ensure that script exists 2017-09-03 10:10:50 +02:00
Vladimir Iakovlev f9a4b69362 #N/A: Reorganize entrypoints 2017-09-02 09:30:03 +02:00