This is a very simple clone of GNU less
, written in GNU AWK programming language.
- GNU AWK 4.0+
- ncurses
- coreutils
- Read a file calling it as an argument:
./less-clone.gawk <filename>
- If no argument is given, the program will ask for the filename.
h
/j
/k
/l
and arrow keys to scroll on every direction.b
/f
to scroll one page up or down.q
to quit.
- Properly change the status line.
- Command option (:) is still useless. Not fully implemented. Maybe remove it for good. [removed]
- Handle invalid filename
- Simplify change of terminal properties with stty and tput. It is too hard coded now.
- Handle long lines. Now they are capped by the number of columns of the terminal. [added horizontal scrolling]
- On function get_input: substitute if-elses for the
switch
statement. - Add functions to treat redundant parts.
- Handle large lines by wrapping, which is the default
less
behaviour. - Add command to open another file.
- Add help command, focusing on a lean status line.