Glavin001 / MrShell

Map-Reduce inspired Shell.
MIT License
4 stars 1 forks source link

Command History #10

Open Glavin001 opened 9 years ago

Glavin001 commented 9 years ago

Build libedit or readline support into your shell.

From http://stackoverflow.com/a/2649756/2578205

Frozenfire92 commented 9 years ago

I was thinking it would be cool to have history that kept stats of your most used commands. That way you could have a most recent history as well as your most used commands at your fingertips. These stats could also be used to improve #9

Glavin001 commented 9 years ago

Ooh I like that idea. History stats would be sweet! And @valencik and I were talking about more data for each history entry, such as the environment variables, current-working-directory, timestamp, and also merging histories between multiple instances of Shells (central database of history?).

Glavin001 commented 9 years ago

gnu readline: How to keep a history list of entered command lines: http://cc.byexamples.com/2008/06/13/gnu-readline-how-to-keep-a-history-list-of-entered-command-lines/

Glavin001 commented 9 years ago

Readline is annoying. The history sometimes breaks prompt..

Reproduce:

pwd
ls
ls -la
grep
<UP ARROW>grep
<UP ARROW>ls -la
<DOWN ARROW>ls -la            grep

It seems to be always a fixed whitespace. Not sure if it's a buffer problem; on our end; readline.. gah.

/cc @DylanYoung, I've assigned this to you if you'd like to take a look at it.