# REPL Autocorrection

**URL:** <https://discourse.julialang.org/t/repl-autocorrection/12750>\
**Category:** General Usage\
**Tags:** proposal\
**Created:** [July 30, 2018, 5:48pm UTC](https://discourse.julialang.org/t/repl-autocorrection/12750 "2018-07-30T17:48:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arnavsood](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arnavsood/32/4675_2.png) [@arnavsood](https://discourse.julialang.org/u/arnavsood)\
**Post date:** [July 30, 2018, 5:48pm UTC](https://discourse.julialang.org/t/repl-autocorrection/12750/1 "2018-07-30T17:48:49Z")

</div>

Migrated from [GitHub](https://github.com/JuliaLang/julia/issues/28347).

One thing that’s great on macOS is the terminal utility `fu&k`, which looks at what you just typed (and other context, like where your terminal is), and pre-loads a series of corrections. For example, a top-level command `cd Dekstop` might be corrected to `cd Desktop`.

I think something like this might be good for the Julia REPL. For example, if you type something that’s a char off from a variable in `Main`, or if your parantheticals are mismatched, or… We already have some support for this kind of thing, like the `did you mean...` feature in help mode, so it seems like this is a logical next step.

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [July 30, 2018, 6:39pm UTC](https://discourse.julialang.org/t/repl-autocorrection/12750/2 "2018-07-30T18:39:04Z")

</div>

Something like that might be nice as an optional feature, but I can well imagine it wreaking havoc if you are not very careful.

For example, suppose I declare some variable `x1` and _intend_ to declare `x2` but forget. Then, if I’m typing `x2` somewhere, perhaps I absentmindedly tab through some suggestions (perhaps because I’m already using tab for auto-complete) and wind up inadvertently putting in `x1` when I meant `x2`. Further suppose that `x1` and the intended `x2` are of the same type. Now I have a silent bug in my code. This might be kind of scary depending on what it is.
