Functions
*********

Basic Functions
===============

exit -- exit cftp
-----------------

  * Synopsis: exit [-f]

Close the connection to the remote server and exit CFTP; if you have tagged files, CFTP asks for confirmation (unless the -f option is given).

version -- display version number
---------------------------------

  * Synopsis: version

Display the CFTP version string.

redraw -- redraw screen
-----------------------

  * Synopsis: redraw [-c]

Clear and redraw the screen.

Use this function if something messed up your display.  If -c is given (as it is in the default bindings), the cursor is centered on the screen.

show-name -- show name of file under cursor
-------------------------------------------

  * Synopsis: show-name

Display the name of the file under the cursor in the message area.

help -- display help
--------------------

  * Synopsis: help

Display help on a function or option, or the binding of a key.

Asks if you want help on a function, option or key binding.  For functions, their help string is displayed.  Help on an option shows its short name (e. g., 'mo' for mode), its type (boolean, character, integer, string, or enum), its current value and help string.  For key bindings, help displays the function with arguments (if any), as it is executed when you press the key.

If you press the shifted letter for a category, a list of all functions, options, or key bindings will be displayed.

lcd -- change directory on local host
-------------------------------------

  * Synopsis: lcd [dir]

Change the current directory on your local host; if you don't supply DIR, you will be prompted for it.  The new current directory is printed.

shell -- shell escape
---------------------

  * Synopsis: shell [cmd arg ...]

Execute shell command; if no command is given, you are prompted for it.  Enter empty string to get an interactive shell.

colon -- execute cftp command
-----------------------------

  * Synopsis: colon [args ...]

Execute an arbitrary CFTP command.

Allows you to execute functions not bound to a key.

deidle -- deidle connection
---------------------------

  * Synopsis: deidle

Send a noop to ftp server, thus resetting idle time on server.

This prevents the server from logging you out due to timeouts.  Since CFTP caches directory listings, a timeout can occur even while you're actively using CFTP.

site -- send site specific command
----------------------------------

  * Synopsis: site [cmd arg...]

Send a site specific command to ftp server.

reconnect -- reconnect to server
--------------------------------

  * Synopsis: reconnect

Reopen connection to server.

You can use this function when you were disconnected after a timeout or network hickup.  To prevent timeouts, use deidle.

response -- display dialog with server
--------------------------------------

  * Synopsis: response

Display a log of CFTP's communication with the remote host.

Commands sent by CFTP and the responses from the remote host are kept in a log, with commands prefixed with ->.  You can change the number of lines to keep in the log with the option hist-size.

mkdir -- create directory on server
-----------------------------------

  * Synopsis: mkdir [directory]

Create directory DIRECTORY on server.

rmdir -- remove directory on server
-----------------------------------

  * Synopsis: rmdir [directory]

Remove directory DIRECTORY on server.

prefix -- prefix digit
----------------------

  * Synopsis: prefix

Enter a digit of the prefix argument for another command.

bind -- bind key
----------------

  * Synopsis: bind [<state>]key [cmd [args ...]]

Change binding for KEY.

If CMD (the command) is omitted, remove the key binding. <STATE> specifies the binding state and defaults to <global>.  This command is mainly used in the cftprc.

set -- set option
-----------------

  * Synopsis: set [option [value]]

Set OPTION to VALUE.

If either VALUE or OPTION and VALUE are omitted, you will be asked for them.  If you enter an empty string the command will be cancelled.

Scrolling Functions
===================

down -- move cursor N lines down (default: 1)
---------------------------------------------

  * Synopsis: down [N]

Move cursor down N lines, wrapping around at the bottom.

N can be a prefix argument.

up -- move cursor N lines up (default: 1)
-----------------------------------------

  * Synopsis: up [N]

Move cursor up N lines, wrapping around at the top.

N can be a prefix argument.

page-down -- move N screens down (default: 1)
---------------------------------------------

  * Synopsis: page-down [N]

Move down N screens, placing the cursor at the top of the screen. Wrap around to the first line if at the last screen.

N can be a prefix argument.

page-up -- move N screens up (default: 1)
-----------------------------------------

  * Synopsis: page-up [N]

Move up N screens, placing the cursor at the top of the screen. Wrap around to the last screen if at the first line.

N can be a prefix argument.

goto -- goto line N (default: last)
-----------------------------------

  * Synopsis: goto [N]

Move cursor to line N.

N can be a prefix argument.  If line N doesn't exist or N is zero, the cursor moves to the last line.

isearch -- incremental search
-----------------------------

  * Synopsis: isearch

Search directory listing incrementally.

Selection Functions
===================

enter/get -- enter directory or get file
----------------------------------------

  * Synopsis: enter/get [file]

Enter directory or get file; default is file/directory at cursor.

enter/view -- enter directory or view file
------------------------------------------

  * Synopsis: enter/view [file]

Enter directory or view file; default is file under cursor.

enter -- enter directory
------------------------

  * Synopsis: enter [file]

Enter directory; default is directory under cursor.

reload -- reload current directory
----------------------------------

  * Synopsis: reload

Reload listing of current directory from server, disregarding cache.

get -- get file
---------------

  * Synopsis: get [file]

Get file; default is file under cursor.

view -- view file
-----------------

  * Synopsis: view [file]

View file;  default is file under cursor.

pipe -- pipe file to command
----------------------------

  * Synopsis: pipe [-q] file cmd [arg ...]

Pipe file to command CMD.  If -q is given, display is not escaped (thus, CMD should not produce any output).

put -- put file
---------------

  * Synopsis: put [file]

Put file; if no file name given, you will be prompted for it.

leave -- leave current directory
--------------------------------

  * Synopsis: leave

Leave current directory, positioning cursor over it.

cd -- change directory
----------------------

  * Synopsis: cd [dir]

Change remote directory;  default is to directory under cursor.

state -- change binding state
-----------------------------

  * Synopsis: state [state]

Change binding state to STATE. See Binding States.

leave-tag -- leave <tag> state
------------------------------

  * Synopsis: leave-tag

Leave <tag> state, entering whatever state was active before entering <tag> state.

Tagging Functions
=================

tag -- tag/untag file for later download
----------------------------------------

  * Synopsis: tag [file]

Tag file; default is file under cursor.

clear-tags -- clear all tags
----------------------------

  * Synopsis: clear-tags

Clear all tags.

get-tags -- get tagged files
----------------------------

  * Synopsis: get-tags download tagged files

Download tagged files.

save-tags -- save tag list to file
----------------------------------

  * Synopsis: save-tags [file]

Save tag list to file, in the same format as the listing in <tag> state.

load-tags -- load tag list from file
------------------------------------

  * Synopsis: load-tags [file]

Load tags from file and merge them with current tags.  A tags file contains one tag per line, each consisting of up to three whitespace separated fields: size (integer, -1 for unknown; optional), type (`d'irectory, palin `f'ile, `l'ink, or `x' for unknown; optional), and name (mandatory).

save-urls -- save tags as url list
----------------------------------

  * Synopsis: save-urls [file]

Save tag list to file, in URL notation.