1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
Commit graph

1 commit

Author SHA1 Message Date
Kyrylo Silin
09ebd358e1 pry_instance: factor out command state to be global
This change is aimed to simplify #1843 (Rework the Pry config).

Current command state implementation gets in the way. We would like to simplify
the Config class. The current implementation penetrates Pry codebase everywhere,
and during my rework of the config I discovered that `watch` uses global command
state.

It means the state should survive `Pry.new` calls. With my (unpublished yet)
implementation, the `watch` command fails to do so. I realised that we can
refactor command state implementation to be global. It makes sense to me and
also helps with the Config refactoring.

With help of a dedicated class we can easily manage the command
state (resetting).
2019-04-29 20:06:51 +03:00