mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-28 04:51:15 -03:00
Today the reader exposes its internals directly, e.g. to the commandline builtin. This is of course not thread safe. For example in concurrent execution, running `commandline` twice in separate threads would cause a race and likely a crash. Fix this by factoring all the commandline state into a new type 'commandline_state_t'. Make it a singleton (there is only one command line after all) and protect it with a lock. No user visible change here.