libcli User's Guide

Table of Contents

  1. Introduction
  2. History
  3. Command-Line Editing

Introduction

libcli provides a consistant command-line environment for remote clients, with a few common features between every implemtation.

The library is not accessed by itself, rather the software which uses it listens on a defined port for a Telnet connection. This connection is handed off to libcli for processing.

The first thing that libcli does is the Telnet negotiation necessary to establish a character mode session, rather than the Telnet default of a line mode session. This is to enable command-line editing, completion and history.

A libcli implementation may require authentication before giving you access to the environment. If so, a Username: prompt will be issued. Enter the username you have been given, and a Password: prompt will appear. The characters you enter for your password will not be echoed.

To leave any libcli command-line environment, enter the command "quit" (aliases are exit and logout), hit Ctrl-D, or simply break the connection.

History

libcli keeps track of the last 256 commands you entered in the session. To search back through the history, use the up and down arrow keys. The Up arrow selects the previous command.

You can also enter "history" to get a list of all the commands in the history.

Command-Line Editing

You can edit the command currently at the prompt:

  • Left & Right arrows move the cursor around on the line.
  • Ctrl-U clears the line
  • After changing the line and hitting enter, the new command line will be added to the end of the history.

    If you don't remember the command name that you want, you can press ? at any time to get a list of available commands. If you enter ? when you are half-way through entering a word, you will get a list of all commands which match what you have already entered.

    David Parrish <david@dparrish.com> 2003-04-23