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

Add -c and -d options to history #399

Closed
jyn514 opened this issue Jul 6, 2019 · 3 comments
Closed

Add -c and -d options to history #399

jyn514 opened this issue Jul 6, 2019 · 3 comments

Comments

@jyn514
Copy link
Contributor

jyn514 commented Jul 6, 2019

Sometimes I type in my password to the shell instead of sudo by mistake. It would be nice to have an option to delete it with history -c instead of having to find the history for osh and delete it manually. From help history in bash:

history: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
    Display or manipulate the history list.
    
    Display the history list with line numbers, prefixing each modified
    entry with a `*'.  An argument of N lists only the last N entries.
    
    Options:
      -c        clear the history list by deleting all of the entries
      -d offset delete the history entry at position OFFSET.
@andychu
Copy link
Contributor

andychu commented Jul 6, 2019

Yes, I recall seeing this in some programs, maybe it was fzf #322

@andychu
Copy link
Contributor

andychu commented Jan 26, 2020

FWIW #562 and #358 are user requests for history flags/features. I guess people use this builtin a lot more than I do!

@andychu
Copy link
Contributor

andychu commented Mar 7, 2020

Fixed: https://www.oilshell.org/release/0.8.pre2/

@andychu andychu closed this as completed Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants