# The command line interface

Gretl Manual: Gnu Regression, Econometrics and Time-series Library
Prev |  | Next

# Chapter 15. The command line interface

# Gretl at the console

The `gretl` package includes the command-line program `gretlcli`. On Linux it can be run from the console, or in an xterm (or similar). Under MS Windows it can be run in a console window (sometimes inaccurately called a "DOS box"). `gretlcli` has its own help file, which may be accessed by typing "help" at the prompt. It can be run in batch mode, sending outout directly to a file (see the Section called gretlcli in Chapter 12 above).

If `gretlcli` is linked to the `readline` library (this is automatically the case in the MS Windows version; also see Appendix B), the command line is recallable and editable, and offers command completion. You can use the Up and Down arrow keys to cycle through previously typed commands. On a given command line, you can use the arrow keys to move around, in conjunction with Emacs editing keystokes.[1] The most common of these are:

Keystroke | Effect
--- | ---
`Ctrl-a` | go to start of line
`Ctrl-e` | go to end of line
`Ctrl-d` | delete character to right

where "`Ctrl-a`" means press the "`a`" key while the "`Ctrl`" key is also depressed. Thus if you want to change something at the beginning of a command, you don't have to backspace over the whole line, erasing as you go. Just hop to the start and add or delete characters.

If you type the first letters of a command name then press the Tab key, readline will attempt to complete the command name for you. If there's a unique completion it will be put in place automatically. If there's more than one completion, pressing Tab a second time brings up a list.

### Notes

[1] | Actually, the key bindings shown below are only the defaults; they can be customized. See the readline manual.

Prev | Home | Next
Auxiliary programs |  | Changes from Ramanathan's ESL