click-contrib / click-repl

Subcommand REPL for click apps
MIT License
215 stars 41 forks source link

History not working on the top of the tree #36

Closed lseshan closed 6 years ago

lseshan commented 6 years ago

steps: make testrepl

bar Bar! <<< Up arrow does not display the history>>

untitaker commented 6 years ago

It works just fine for me, please tell me exactly what you're doing and include a dump of pip freeze

lseshan commented 6 years ago

Steps I tried (Inside virtualenv):

  1. Install click, click_repl using pip
  2. git clone https://github.com/click-contrib/click-repl
  3. Fix "completer" keyword in init.py:131
  4. sudo pip install -e ~/click_repl/click-repl/
  5. make testrepl
  6. type in command - "bar" or "foo". Now when I press up arrow, no response. With click installed from pip, I see correct behaviour.

Pip freeze output: click==7.0.dev0 -e git+https://github.com/click-contrib/click-repl@90354daf9a5ec7bbaa4f90b31abc26fdc2a104b7#egg=click_repl penshell==0.1 prompt-toolkit==1.0.15 six==1.11.0 wcwidth==0.1.7

Reason it is not working:

  1. Everytime a new history object is created in call to prompt in init.py:174 and hence history is not preserved.

git log commit 90354daf9a5ec7bbaa4f90b31abc26fdc2a104b7 Merge: 8edf7c6 f4de8d1 Author: Markus Unterwaditzer markus@unterwaditzer.net Date: Sun Jul 2 16:19:13 2017 +0200

Merge pull request #32 from lwm/refactor+add+script

Small refactor and some other bits

commit f4de8d1b81a38c94bace675a592d40c701e0e8b6 Author: Luke Murphy lukewm@riseup.net Date: Sun Jul 2 00:52:37 2017 +0100

untitaker commented 6 years ago

Thanks, should be fixed in master, can you confirm?

On Thu, Nov 23, 2017 at 02:10:57AM +0000, lseshan wrote:

Steps I tried (Inside virtualenv):

  1. Install click, click_repl using pip
  2. git clone https://github.com/click-contrib/click-repl
  3. Fix "completer" keyword in init.py:131
  4. sudo pip install -e ~/click_repl/click-repl/
  5. make testrepl
  6. type in command - "bar" or "foo". Now when I press up arrow, no response. With click installed from pip, I see correct behaviour.

Pip freeze output: click==7.0.dev0 -e git+https://github.com/click-contrib/click-repl@90354daf9a5ec7bbaa4f90b31abc26fdc2a104b7#egg=click_repl penshell==0.1 prompt-toolkit==1.0.15 six==1.11.0 wcwidth==0.1.7

Reason it is not working:

  1. Everytime a new history object is created in call to prompt in init.py:174 and hence history is not preserved.

git log commit 90354daf9a5ec7bbaa4f90b31abc26fdc2a104b7 Merge: 8edf7c6 f4de8d1 Author: Markus Unterwaditzer markus@unterwaditzer.net Date: Sun Jul 2 16:19:13 2017 +0200

Merge pull request #32 from lwm/refactor+add+script

Small refactor and some other bits

commit f4de8d1b81a38c94bace675a592d40c701e0e8b6 Author: Luke Murphy lukewm@riseup.net Date: Sun Jul 2 00:52:37 2017 +0100

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/click-contrib/click-repl/issues/36#issuecomment-346518295