Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Up Arrow key tries history, re-filters list. #3

Open
zjr opened this issue Mar 26, 2019 · 3 comments
Open

Up Arrow key tries history, re-filters list. #3

zjr opened this issue Mar 26, 2019 · 3 comments

Comments

@zjr
Copy link

zjr commented Mar 26, 2019

If I have a checkbox prompt open, type in "foo" then go about my business, everything is fine.

If I then run the prompt later, type in "bar" and try to scroll upwards w/ the up arrow key, I am getting history put into the search.

I'm running bash on MacOS.

Would love to look into this myself, but not sure I'll have the time any day soon.

@zWingz
Copy link

zWingz commented May 19, 2021

can you resolved it @zjr ?

@zjr
Copy link
Author

zjr commented May 19, 2021

No, sorry @zWingz.

@zWingz
Copy link

zWingz commented May 21, 2021

@zjr

import Base from 'inquirer/lib/prompts/base';

export class ClearHistory extends Base {
  constructor(questions: any, rl: any, answers: any) {
    super(questions, rl, answers);
   // clear readline history
    rl.history = [];
  }
}

create a new plugin to clear readline history, ant it work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants