import std.stdio; void main() { string line; string[] history; line = readln(); foreach(int i; 0..100) history = history + [""]; // XXX while(!stdin.eof) { writeln(line); if(line != history[0]) { history[1..100] = history[0..99]; history[0] = line; } line = readln(); } }
I'm trying to make a terminal input preprocessor with
alias/shortcuts and history.
- how do you append arrays? asdf via Digitalmars-d-learn
- Re: how do you append ar... Nicholas Wilson via Digitalmars-d-learn
- Re: how do you appen... asdf via Digitalmars-d-learn
- Re: how do you appen... cym13 via Digitalmars-d-learn
- Re: how do you a... asdf via Digitalmars-d-learn
- Re: how do y... Nicholas Wilson via Digitalmars-d-learn
- Re: how... ag0aep6g via Digitalmars-d-learn
- Re:... Nicholas Wilson via Digitalmars-d-learn
- Re: how do y... Steven Schveighoffer via Digitalmars-d-learn
- Re: how... Steven Schveighoffer via Digitalmars-d-learn
- Re:... asdf via Digitalmars-d-learn