FD(1)

NAME
fd - file & directory maintenance tool

SYNOPSIS
fd [ -abCefhiklmNnPrSsTtuvx ] [ -NAME=value ] [ directory [ directory2 ... ]]
fdsh [ -abCcefhiklmNnPrSsTtuvx ] [ args ]

DESCRIPTION
Fd is a file & directory maintenance tool considered for the text terminals on general UNIX. It aims for a clone of the same named utility which is made for the PC/AT compatible machine and PC-9800 series. In fact, it is upper compatible functionally. Fd shows the browser screen listing files when you have invoked it. You can input some key which is bound each command, to execute various operations. (In the following description, (UNIX) means that the operation is implemented only on UNIX version and not effective on MS-DOS version. As well as it, (DOS) means that the operation is implemented only on MS-DOS version.)

  Options
The command line option is used for setting internal shell operations and setting the internal variables described below. You can use any variable name as the internal variable, but fd can accept only those which are described in the below section of ENVIRONMENT VARIABLES. If you specify directory, the current directory is moved to the directory initially. If you specify directory2 ..., the split window mode is invoked, and the current directories of the supplemental windows are moved to the each directory. The following options are available for the internal shell.

-c string
    Commands described by string are executed and exit immediately. It is effective only when it is invoked as fdsh.

-i  If the -i flag is present or if the standard input/output is a terminal, the shell is the interactive shell.

-s  If the -s flag is present or if no args is specified, commands for the shell are read from the standard input. Any remaining argument specifies the positional parameter.

-r  The shell is a restricted shell. Specifically, the following operations are disallowed.
    changing the current directory
    setting the value of $PATH, $SHELL and $ENV
    specifying command names include /
    redirecting output (> and >>)
    IN_DIR	OUT_DIR	LOG_TOP
    LOG_DIR	ATTR_FILE	COPY_FILE
    MOVE_FILE	DELETE_FILE	DELETE_DIR
    RENAME_FILE	MAKE_DIR	WRITE_DIR
    TREE_DIR	BACKUP_TAPE	EDIT_FILE
    UNPACK_FILE	PACK_FILE	LOG_TREE
    COPY_TREE	MOVE_TREE	UNPACK_TREE
    FIND_DIR	ATTR_DIR
    When invoked as rfd or rfdsh, it becomes this restricted shell automatically.

-l  The shell is a login shell.

-N  Reading the initial configuration files is omitted.

In addition, the options described below in the description of set the builtin command are available.

  Screen Layout
Fd has the 3 major screen modes. In the browser screen, you can select from the file list and execute each command. In the archive browser screen, files in the archive file are listed separately by directory, and you can browse as well as the browser screen. In the tree screen, you can move on the directory tree and select the directory path. In all screen modes, each 3 lines on the top/bottom of the screen are used for the various information of fd. The top information lines sometimes become 4 lines. The screen layout is the following.

line#
    Description

1   The title line. The clock at the right end is updated every 10 seconds.

2   The information line. It displays information in this order: the current page (and the total pages), the number of marks (ant the total marks), the sorted type, the pattern string for file search.

3   The path line. It displays the fullpath of the current directory. In the archive browser screen, it displays the fullpath of the archive file and the current path in the archive.

2 (optional)
    The file size information line. It displays the total size of the marked files in the directory (and the total size of all files), the total capacity and the free size of the file system including the current directory. This line appears by SIZEINFO the internal variable setting. When this line is displayed, The information line and the path line are displayed 1 line under each.

bottom - 2
    The stack line. It displays files temporarily which you push in stack, when arranging files.

bottom - 1
    The function line. It displays the operations of function keys.

bottom
    The status line. It displays the status of the file on the cursor position. It also displays warning messages when command is executed with some troubles.

  Internal Commands
You can use the following internal commands on fd. While any user can change the key binding for these internal commands, here shows the default key binding. The identifier is used when it is executed from the command line of EXECUTE_SH command, and when the user defines the key binding.
Identifier	Command	Key
CUR_UP	Move a cursor up	Up
CUR_DOWN	Move a cursor down	Down
CUR_RIGHT	Move a cursor right	Right
CUR_LEFT	Move a cursor left	Left
ROLL_UP	Turn ahead to the next page	PageDown
ROLL_DOWN	Turn back to the prev. page	PageUp
CUR_TOP	Move a cursor top	Beg(<)
CUR_BOTTOM	Move a cursor bottom	Eol(>)
FNAME_RIGHT	Shift right a filename	(
FNAME_LEFT	Shift left a filename	)
ONE_COLUMN	Change layout into 1 column	1
TWO_COLUMNS	Change layout into 2 columns	2
THREE_COLUMNS	Change layout into 3 columns	3
FIVE_COLUMNS	Change layout into 5 columns	5
MARK_FILE	Mark a file	Tab
MARK_FILE2	Mark and move down	Space
MARK_FILE3	Mark and move in a page	^Space(^@)
MARK_ALL	Mark all files	Home(+)
MARK_REVERSE	Mark all files reversely	End(-)
MARK_FIND	Mark the matched files	*
IN_DIR	Change to a sub directory	Return
OUT_DIR	Change to a parent directory	Bs
LOG_TOP	Change to a root directory	\
REREAD_DIR	Reread the current directory	^L
PUSH_FILE	Push a file to the stack	Del(])
POP_FILE	Pop a file from the stack	Ins([)
LOG_DIR	Change to a logical directory	F1(l)
EXECUTE_FILE	Execute a file	F2(x)
COPY_FILE	Copy a file	F3(c)
DELETE_FILE	Delete a file	F4(d)
RENAME_FILE	Rename a file	F5(r)
SORT_DIR	Sort the current directory	F6(s)
FIND_FILE	Find files	F7(f)
TREE_DIR	Display the tree screen	F8(t)
EDIT_FILE	Edit a file	F9(e)
UNPACK_FILE	Unpack a file	F10(u)
ATTR_FILE	Change a file attribute	F11(a)
INFO_FILESYS	Display a file system info.	F12(i)
MOVE_FILE	Move a file	F13(m)
DELETE_DIR	Delete a directory	F14(D)
MAKE_DIR	Make a directory	F15(k)
EXECUTE_SH	Execute a child process	F16(h)
WRITE_DIR	Write a displayed directory	F17(w)
BACKUP_TAPE	Backup into a tape	F18(b)
VIEW_FILE	View a file	F19(v)
PACK_FILE	Pack a file	F20(p)
LOG_TREE	Change directory with tree	L
COPY_TREE	Copy a file with tree	C
MOVE_TREE	Move a file with tree	M
UNPACK_TREE	Unpack a file with tree	U
FIND_DIR	Find a file recursively	F
ATTR_DIR	Change attributes recursively	A
SYMLINK_MODE	Switch the symbolic link mode	S
FILETYPE_MODE	Switch the file type symbol	T
DOTFILE_MODE	Switch the dot file display	H
FILEFLG_MODE	Switch the file flag display	O
LAUNCH_FILE	Invoke the launcher	Return
SEARCH_FORW	Search forward a file	^S
SEARCH_BACK	Search backward a file	^R
SPLIT_WINDOW	Split into the windows	/
NEXT_WINDOW	Change to the next window	^
WIDEN_WINDOW	Widen the current window	W
NARROW_WINDOW	Narrow the current window	N
KILL_WINDOW	Kill the current window	K
EDIT_CONFIG	Invoke the customizer	E
HELP_MESSAGE	Display a help screen	?
QUIT_SYSTEM	Quit from fd	Esc(q)
WARNING_BELL	Bell for warning
NO_OPERATION	Do nothing

The last 2 internal commands are used when you want change the default key binding to cancel.

  Internal Commands Description
The detail of each internal command is the following. Internal commands with similar function are described together.

    Move cursor
        Move a cursor.

    Turn page
        Turn to the previous/next page, when files are not completely held in a screen. Also if you try to move out of the page with Cursor move, the page will be turned.

    Move to the top/bottom
        Move a cursor to the top/bottom of the file list. When the list is not held in a screen, the page is turned.

    Shift filename
        Shift the displayed string of filename on the cursor position, when the filename is longer than the prepared column width. It is displayed as shifted to right/left by 1 character. The display of the status line is also shifted simultaneously.

    Change layout
        Change the number of columns into each value. There are usually 2 columns per screen. As the column width per file is changed according to the number of columns, the displayed information is also changed.

    Mark file
        Mark the file on the cursor position. You cannot mark any directory. [Space] marks and moves down a cursor. [^Space] also marks and moves down a cursor, but doesn't turn the page. [Home] marks all the files, [End] marks all the files reversely. [*] additionally marks the file which matches the wildcard. You must input the wildcard string whenever you push [*]. Marked files are used as the target of ATTR_FILE, COPY_FILE, DELETE_FILE, MOVE_FILE, UNPACK_FILE and the user defined command macros.

    Change directory
        [Return] changes the current directory to the directory on the cursor position. If you want to change it to the parent directory, you should move a cursor to the file of ".." and push [Return], or simply push [Bs]. [\] changes the current directory to the root directory.

    Push/pop file stack
        [Del] pushes the file on the cursor position to the file stack, and temporarily deletes the file from the file list screen. You can push files to the file stack up to 5 files. [Ins] pops the file from the file stack and insert it on the cursor position. The last pushed file is popped first. But this order is expediently displayed in fd, and it is reset by Directory move.

    Redraw screen
        Redraw the file list screen by rereading the information of the current directory. It is useful when some other process add/delete files, or when something break the screen display. Moreover, when you use the terminal which doesn't raise SIGWINCH signal at changing the screen size (like kterm(1) on HP-UX etc.), you must intentionally redraw after you change the screen size.

    Change logical directory (Logdir)
        Change the current directory to the inputted pathname. When you input the pathname which starts with '/', it means not the relative move but the absolute move. When you input the pathname ".", the pathname of the current directory is adjusted into absolute expression. Except this case, the current directory always is shown as the virtual pathname, by reason of a link and so on. When you input the pathname "?", you can move to the current directory when fd was invoked. When you input the pathname "-", you can move to the last visited directory. Moreover, When you input the pathname "@" in floppy drive, you can move to the directory on UNIX file system, where you existed before moving to floppy drive. (UNIX) (Note: This command is called as "Loddsk" in the original FD on MS-DOS, which is short for "LOGical DiSK drive". This "logical" means the drive name prefixed to pathnames, and it is virtually named against "physical disk drive". On UNIX, since "logical disk drive" never means pathname nor directory, this command name "Change logical directory" is not suitable. But this name is expediently inherited from the original version.)

    Execute file (eXec)
        Execute the file on the cursor position with some parameters, as the child process. The cursor position in command line exists after the filename in case of the executable file, and before the filename except it. You should fill suitable parameters or command name in each case. The up/down cursor keys can provide the command history which you executed before. On MS-DOS version, the LFN form filename in the command line which is quoted with the quotation mark " is automatically replaced into 8+3 form filename before execution. In this case, when there is the filename described by the string quoted with ", this string is always replaced into 8+3 form filename after deleting ", otherwise it is never replaced including ".

    Copy file (Copy)
        Copy the file on the cursor position to the specified directory. When the cursor position indicates a directory, its contents are copied recursively. When some files are marked, the target is not the file on the cursor position but the marked files. When the same named file exists in the destination, you can select the operation from the following: "Update (by timestamp)", "Rename (each copied file)", "Overwrite", "Not_copy_the_same_name", "Forward". If you select "Forward", you should specify the directory as the destination to forward. All files which have the same names are moved to the specified directory.

    Delete file (Delete)
        Delete the file on the cursor position. No directory can be deleted. When some files are marked, the target is not the file on the cursor position but the marked files. When you don't have write permission on the file, you are confirmed for security.

    Rename file (Rename)
        Rename the file on the cursor position. You cannot rename to the same name as any existent file. When you specify the pathname with some directory name, it is also moved to the directory.

    Sort file (Sort)
        Sort files in the current directory. You can select the sorted type from the following: "fileName", "Extension", "Size", "Timestamp", "Length (of filename)", and specify "Up (incremental order)" or "Down (decremental order)". When the sorted type before sorting is the one except "No chg (not sort)", the choice will include "No chg". When you sort after sorting another sorted type, the previous sorted result is based in sorting. This sorting has a priority except specified type, the directory is always precedes any file, except for the case of "No chg". In case of "Length", files which have the same filename length are sorted in order of their names. But this sorting is expediently displayed in fd, and it is reset by Directory move.

    Find file (Find)
        Find the files matching the wildcard, and display only them. The filename which starts with '.' doesn't match the wildcard which starts with '*' nor '?'. If you want to cancel the File find, you should move the current directory, or do FIND_FILE again and input a null line. When the current directory has the files which have the extension registered to associate with an archive browser, the string which starts with '/' is used to find not the filename but the filename in archive files, and only the archive files which contain matched files are displayed. This function is available in the archive browser. After Find file, you can not do WRITE_DIR.

    Display tree screen (Tree)
        Display the directory tree based on the current directory. You can select the directory in the tree screen, to move the current directory.

    Edit file (Editor)
        Edit the file on the cursor position. The editor is used referring EDITOR the internal variable, or referring EDITOR the environment variable when the internal variable is undefined.

    Unpack file (Unpack)
        Unpack the archive file on the cursor position into the specified directory. In builtin configuration, you can unpack only the tar file and its compressed file and the LHa compressed file. You can describe configurations in the initial configuration file to support archivers except these.

    Change attribute (Attr)
        Change the file access mode, the timestamp and the owner/group of the file on the cursor position. When some files are marked, the target is not the file on the cursor position but the marked files. In case of the marked files, you must select the mode, the timestamp or the owner/group, before changing it all together. When you input the mode, cursor keys move a cursor to the position you want to change, [Space] reverses the attribute on the position. You should notice that the attribute of the execution bit is not a binary toggle but a triple toggle, which includes setuid bit, setgid bit and sticky bit respectively. If the target is the marked files, [m](Mask) will mask a bit on the cursor position with '*', to keep the value of the original file attribute. When you input the timestamp, you move a cursor to the position you want to change, and input a numeric value. When you input the owner/group, you move a cursor to the position for each name, and input a name or a ID value with [Space]. You can use the completion for a user name and a group name to input each name. Finally, [Return] executes the change. You can cancel with [Esc]. Be careful that the limit check of date is not perfect. Moreover, [a](Attr), [d](Date), [t](Time), [o](Owner) and [g](Group) move a cursor to the each beginning of input line. On the OS which has the attribute of file flags, you can change the file flags as well as the mode. In this case, [f](Flag) move a cursor to the beginning of input line of file flags. But the value of flags which you can change is based on your permission.

    File system information (Info)
        Display the information of the specified file system. When the inputted pathname is not the special file which indicates a file system, the information of the file system including the pathname is displayed.

    Move file (Move)
        Move the file on the cursor position to the specified directory. When the cursor position indicates a directory, the directory itself is moved. When some files are marked, the target is not the file on the cursor position but the marked files. When the same named file exists in the destination, you can select the operation as well as COPY_FILE. When the destination belongs to the different file system, copy and delete are just executed continuously.

    Delete directory (rmDir)
        Delete the directory on the cursor position recursively. When the directory in a symbolic link, only the link is deleted and the linked directory has no effect.

    Make directory (mKdir)
        Make the sub directory on the current directory. When the inputted sub directory string includes '/', which is the pathname delimiter, it goes on making directory recursively until the directory described by the string is finally created. When you input the pathname which starts with '/', the directory is made not on the current directory but on the absolute path described.

    Execute child process (sHell)
        Execute the inputted command string as the child process, by handling the internal shell. You can refer the command history and use automatic LFN replacement, as well as EXECUTE_FILE. When you push only [Return] without any input, the user shell which is described by SHELL the internal variable or the environment variable is invoked. In this case, you should input "exit" to return to fd. When the value of SHELL is fdsh, the internal shell is executed as the interactive shell. However, when there is the same command name as a builtin command or a internal command, the builtin command or the internal command are executed instead of the external command. You can refer the clause of `Builtin Commands' for the details of the builtin command.

    Write directory (Write)
        Write the displayed directory. The gap between files on the directory entry is filled. When it is executed after arranged by PUSH_FILE, POP_FILE and SORT_DIR, the result is written. When the displayed directory doesn't belong to the hierarchy under your home directory, you are confirmed for security whether if any other user doesn't use the directory. Since it is insecure, you cannot write the NFS mounted directory and some special directories. If you execute the internal command which arranges the file order, and then try to execute the internal command which will break that order, you will be confirmed whether if you write the directory or not, just before the internal command is executed. For this function, you can write the directory without intentionally executing this Directory write command. But when the displayed directory is not under your home directory, this confirmation is not done.

    Backup tape (Backup)
        Backup the file on the cursor position into the specified storage device. When the cursor position indicates a directory, all of its contents is backuped. When some files are marked, the target is not the file on the cursor position but the marked files. Tar(1) is used for backup. When you specify the filename except special files indicates devices as input of the device name, the archive file is created with that filename.

    View file (View)
        View the file on the cursor position. The pager is used referring PAGER the internal variable, or referring PAGER the environment variable when the internal variable is undefined.

    Pack file (Pack)
        Pack the file on the cursor position into the specified archive file. When the cursor position indicates a directory, all of its contents is packed into the archive file. When some files are marked, the target is not the file on the cursor position but the marked files. According to the extension of the inputted archive file, the associated archiver is automatically selected. In builtin configuration, you can pack only the tar file and its compressed file and the LHa compressed file. You can describe configurations in the initial configuration file to support archivers except these. When you use tar(1), you may sometimes be unable to pack a lot of files at once, because of the maximum parameter length which can be given at once. In those case, you can create the archive file with BACKUP_TAPE.

    Operations with tree
        [L], [C], [M] and [U] can make you select the pathname from the directory tree instead of the string input. They execute the internal command equivalent to LOG_DIR, COPY_FILE, MOVE_FILE and UNPACK_FILE, respectively.

    Find file recursively
        Find the file matching the wildcard recursively under the current directory, and move the directory where the found file exists. When the cursor position indicates a directory, it find the file under the directory on the cursor position instead of the current directory. You will be confirmed for each matching file whether if you move or not, and you can select [n](No) unless the target file is displayed.

    Change attributes recursively
        Change attributes the directory on the cursor position revursively. As well as changing attributes of the marked files, you must select the mode, the timestamp or the owner/group, before changing it all together with each file under the directory. When you input the mode, you should notice that the attribute of the execution bit is not a triple toggle but a 5-states toggle, which includes 'X' and '!'. 'X' means setting the bit only if the object is a directory or some execution bits are set. '!' also means unsetting the bit only if the object is a directory or some execution bits are set. [m](Mask) will mask a bit on the cursor position with '*', to keep the value of the original file attribute.

    Invoke launcher
        [Return] executes the operation according to the extension of the file on the cursor position, unless the cursor position indicates a directory. In builtin configuration, the archive browser is registered with the tar file and its compressed file and the LHa compressed file. You can describe configurations in the initial configuration file to register launchers except these. When the file on the cursor position has the unregistered extension, it will behave as same as VIEW_FILE. In the archive browser, the registered launcher is available, so that you can invoke the archive browser recursively.

    Switch symbolic link mode
        In case of the symbolic link file, the file information displayed in the file column and the status line shows not the status of its referential file but the status of the link itself. It switches to show the status of the referential file. (UNIX) In the mode of showing the status of the referential file, 'S'(Symbolic Link) is displayed on the left end of the function line.

    Switch file type symbol mode
        Switch to display the symbol which means the file type after the filename in the file list, like as the display in -F option of ls(1). It is toggle to switch if display the symbol or not. The each symbol means the following.
        /	directory
        @	symbolic link
        *	executable file
        =	socket
        |	FIFO
        (MS-DOS version and the floppy drive)
        /	directory
        *	executable file
        =	system file
        |	label
        In the mode of displaying the file type symbol, 'T'(Type) is displayed on the left end of the function line.

    Switch dot file display mode
        Switch not to display the file whose filename starts with '.' in the file list. It is toggle to switch if display the dot file or not. In the mode of not displaying the dot file, 'H'(Hidden) is displayed on the left end of the function line.

    Switch file flag display mode
        Switch to display the file flag, which exists in some OS, instead of the file mode on each file. It is toggle to switch if display the file flag or the file mode. This is not available on any OS without the file flag. The each symbol means the following respectively. (UNIX)
        A	Archived
        N	Nodump
        a	system Append-only
        c	system unChangeable (immutable)
        u	system Undeletable
        a	user Append-only
        c	user unChangeable (immutable)
        u	user Undeletable
        In the mode of displaying the file flag, 'F'(Flags) is displayed on the left end of the function line.

    Search file
        Search the current directory incrementally for the filename, with moving a cursor. When you execute this command, to switch to the search mode, a prompt appears in the function line. You can input the filename in this prompt, and a cursor will move to the filename matching the string which is already inputted at that present. [Esc] switches to the normal mode.

    Split window
        Split the current window. When you split a window in the normal non-split window mode, it will be the split window mode in which the screen is split into 2 windows vertically. In the split window mode, you can operate works individually on each window. When you split a window in the split window mode, the current working window is split into 2 windows vertically. You can make split windows up to 5.

    Change window
        Change effective window to the next in the split window mode. When the current window is the last, the first window will be effective. In the non-split window mode, it is ineffective.

    Widen window
        Widen the current window size in the split window mode, to narrow the next window size. When the current window is the last, the first window size will be narrowed. In the non-split window mode, it is ineffective.

    Narrow window
        Narrow the current window size in the split window mode, to widen the next window size. When the current window is the last, the first window size will be widened. In the non-split window mode, it is ineffective.

    Kill window
        Kill the current window in the split window mode, to join it to the previous window. When the current window is the first, it will be joined to the last window. If the result number of windows is one, it will be the non-split window mode. In the non-split window mode, it is ineffective.

    Invoke customizer
        Invoke the customizer which interactively changes the configurations to be set up by the internal variable and the builtin command. While the configurations which is set up here is reflected immediately, you must intentionally save configurations in the customizer if you want to reflect in the initial configuration file.

    Display help
        Display the list of the current key bindings and their command descriptions. When the list is not completely held in a screen, it prompts for every screen. In case of the circulated executable binary file, this screen shows the E-mail address of the circulation manager in the function line. Please contact here when something will happen.

    Quit (Quit)
        Quit from fd.

  Commands
In EXECUTE_SH and the initial configuration file, you can use the internal commands described above and the builtin commands described below, as well as the external commands. With these commands, a pipeline can consist of one or more commands separated by | or |&. | connects the standard output of the previous command to the standard input of the next command. |& connects both the standard output and the standard error output of the previous command to the standard input of the next command. The exit status of a pipeline is the exit status of the last command. You can start a pipeline with !, then the exit status of a pipeline will be the logical NOT of the exit status of the last command. Moreover, a command list can consist of one or more pipelines separated by ;, &, &|, &&, ||. This command list can end with ;, & or &|. These separators mean the following.
    ;   Execute commands sequentially.
    &   Execute commands synchronously, not waiting for the preceding pipeline to finish. (UNIX)
    &|  Same as &, except to immediately disown the job. (UNIX)
    &&  Execute the following pipeline only if the preceding pipeline returns a 0 exit status.
    ||  Execute the following pipeline only if the preceding pipeline returns a non-0 exit status.
In these command lists, a newline means as same as ;. The input/output of each command in the command list can be redirected with the following redirectees. These redirectees can be placed on any position in the command string.
    n<file
        Redirect the input indicated by the file descriptor n into the input from file. If n is omitted, it is regarded as the standard input is specified.
    n>file
        Redirect the output indicated by the file descriptor n into the output to file. If n is omitted, it is regarded as the standard output is specified. If file doesn't exist it is created, otherwise it is truncated to 0 length before output.
    n>|file
        Same as >, except to force to overwrite existent files even if -C option is set by set the builtin command.
    n>>file
        Redirect the output indicated by the file descriptor n into the output to file. If n is omitted, it is regarded as the standard output is specified. If file doesn't exist it is created, otherwise output is appended to it.
    n1<&n2
        Redirect the input indicated by the file descriptor n1 into the input indicated by the file descriptor n2. If n1 is omitted, it is regarded as the standard input is specified.
    n1>&n2
        Redirect the output indicated by the file descriptor n1 into the output indicated by the file descriptor n2. If n1 is omitted, it is regarded as the standard output is specified.
    &>file
        Redirect both the standard output and the standard error output into the output to file. If file doesn't exist it is created, otherwise it is truncated to 0 length before output.
    &>|file
        Same as &>, except to force to overwrite existent files even if -C option is set by set the builtin command.
    &>>file
        Redirect both the standard output and the standard error output into the output to file. If file doesn't exist it is created, otherwise output is appended to it.
    n<>file
        Redirect both the input/output indicated by the file descriptor n into the input/output from/to file. If n is omitted, it is regarded as the standard input is specified.
    n><file
        Redirect both the input/output indicated by the file descriptor n into the input/output from/to file. If n is omitted, it is regarded as the standard output is specified.
    n1<>&n2
        Redirect both the input/output indicated by the file descriptor n1 into the input/output indicated by the file descriptor n2. If n1 is omitted, it is regarded as the standard input is specified.
    n1><&n2
        Redirect both the input/output indicated by the file descriptor n1 into the input/output indicated by the file descriptor n2. If n1 is omitted, it is regarded as the standard output is specified.
    n<-
    n<&-
        Close the input indicated by the file descriptor n. If n is omitted, it is regarded as the standard input is specified.
    n>-
    n>&-
        Close the output indicated by the file descriptor n. If n is omitted, it is regarded as the standard output is specified.
    n<>-
    n<>&-
        Close both the input/output indicated by the file descriptor n. If n is omitted, it is regarded as the standard input is specified.
    n><-
    n><&-
        Close both the input/output indicated by the file descriptor n. If n is omitted, it is regarded as the standard output is specified.
    n<<[-]word
        Redirect the input indicated by the file descriptor n into the input which is read up to a input line as same as word, or to an end of file. If any part of word is quoted, no input line is evaluated. Otherwise, each input line is evaluated to expand variables or replace strings. When you specify -, all tabs on the beginning of input lines is stripped to be send to a command. If n is omitted, it is regarded as the standard input is specified.
When you specify the file with each redirect, you can describe the filename as `scheme://host:port' form to open the following TCP sockets, according to the string of scheme. The authentication of your OS will restrict specifying the accepting port. (UNIX)
    connect://host:port
        This socket is connected to the remote host specified by host with the TCP port number specified by port.
    accept://[host][:port]
        This socket is accepted to the local host specified by host with the TCP port number specified by port. If host is omitted, this socket will be accepted to any host. If port is omitted, the port within the range determined by the OS is used.
    bind://[host][:port]
        This socket is bound to the local host specified by host with the TCP port number specified by port, preparing accept the builtin command. If host is omitted, this socket will be accepted to any host. If port is omitted, the port within the range determined by the OS is used.
On each command line, the string from '#' to the end of line and a null line are ignored. When the line ends with '\', it is referred as continuing into the next line, so that you can split a long line with this.

  Builtin Commands
Fd has the following builtin commands. These builtin commands can be used in EXECUTE_SH and the initial configuration file.

if list then [elif list then list] ... [else list] fi
    The list of if clause and elif clauses are executed in order, and if each exit status is a 0, then the list of then clause associated with it is executed and the elif clauses after it are ignored. If no list of if clause nor elif clauses return a 0, the list of else clause is executed. If no list of then clauses nor else clause is executed, then if returns a 0 exit status.

while list do list done
    The list of while clause is executed repeatedly, and while its exit status is 0, the list of do clause is executed repeatedly. If the list of do clause is never executed, then while returns a 0 exit status.

until list do list done
    The list of until clause is executed repeatedly, and while its exit status is NOT 0, the list of do clause is executed repeatedly. If the list of do clause is never executed, then until returns a 0 exit status.

for NAME [in value ...] do list done
    NAME the internal variable is substituted for values of value one by one, and list is executed according to the each value. If in value is omitted, then each positional parameter is substituted one by one.

case word in [pattern [| pattern] ... ) list ;;] ... esac
    The string word is compared with the each pattern, list associated with the pattern which first matches it is executed.

(list)
    Execute list in a sub shell.

{ list; }
    Execute list in the current shell.

NAME=[value] [com ...]
    Define a internal variable which is available only in fd. It substitutes the value (string) value for NAME the internal variable. When you describe the command com after the definition of a variable, com is executed on the state where this variable is regarded as the environment variable. In this case, the definition of NAME is not remain as the environment variable nor the internal variable. If value is omitted, the value of NAME the internal variable is defined as a null. If you want to delete the definition of a internal variable, use unset the builtin command.

name() { list; }
    Define a function whose body is list, as the name of name. The defined function can be used in the command line of EXECUTE_SH and each command macro described below. You can use the positional parameter $n in each description of list, which indicates the argument when the function is invoked. $0 is name itself, and $1-$9 indicates each argument. Although you cannot omit { } and list, you can omit { } before/after list which consists of a single command. If you want to delete the definition of a function, use unset the builtin command.

!num
    Execute the command which has the history number specified with the numeric value num. When num is negative value, it executes the command which has the history number as the current history number minus num.

!!  Execute the previous command. This is synonym for !-1.

!str
    Execute the command history which starts with the string str.

: [arg ...]
    No effect. But it evaluates arg and performs redirection.

. file
source file
    Read and evaluate commands from file. File must exists on the directory which PATH includes, or be described with pathname. The each line format is based on the format of EXECUTE_SH. You can describe this in the file as nesting.

accept [fd]
    Accept the connection with the file descriptor indicated by fd, and the connected socket will be assign to fd of the same file descriptor. At the same time, the accepted socket will be closed. When fd is not the redirection as the form of bind://, this command will be failed. In comparison with the redirection as the form of accept://, the shell can receive controls before establishing connection to negotiate the TCP port number with the remote host in advance. (UNIX) If fd is omitted, the connection will be accepted with the standard input.

addcr [-1] [file]
    Output the string read from the file specified by file, line by line. The newline of each line is unified into CR-NL (\r\n). It is useful to pipe the output to some socket. If file is omitted, it is regarded as the standard input is specified. If -1 is specified, it will output just 1 line and exit.

alias [name[=com]]
    Define a alias whose body is com, as the name of name. The defined alias can be used in the command line of EXECUTE_SH and each command macro described below. The alias substitution is performed recursively. If com is omitted, the alias of name is displayed. If both com and name are omitted, all the current alias definition list is displayed.

arch ext [pack unpack]
    Register the archiver command associated with the archive file which has ext the extension. The pack command is specified as pack, and the unpack command is specified as unpack, using the macro representation quoted with ". When ext starts with /, uppercase/lowercase is ignored in the comparison of any extension. If both pack and unpack are omitted, the archiver command registration for ext the extension is deleted.

bg [job]
    Continue the execution of the job specified with job in the background. The following format is available to specify a job. (UNIX)
    %
    %+	the current job
    %-	the previous job
    %n	the job with job number n
    %str	the job whose command line starts with str
    But, you must describe these % in the command line of EXECUTE_SH as the duplicated expression, such as %%, for the reason of the parameter macro function described below. If job is omitted, the current job is continued in the background.

bind c [com1 [com2] [:comment]]
    Bind the command com1 to the key c. When you want to specify a control character for c, you can prefix ^ into 2 characters, such as ^A. When you want to specify a character with the META key (or the ALT key on MS-DOS version), you can prefix @ into 2 characters, such as @a. When you want to specify a function key and a special key, you can use each identifier described in keymap command after, such as F10. Or you can describe the escape sequence, such as \n and \e, and the octal expression, such as \ooo. In case of binding the internal command of fd, you can the command identifier as it is. When you want to define the internal command with some arguments or define the command in the macro representation, you should describe the string quoted with ". If com2 is not omitted, com2 is executed when the cursor position indicates a directory. When the key c is the function key of F1-F20, if you describe comment prefixed with : trailing the command description, you can change the display of associated part in the function line into comment. However, note that, with the key binding for the control key, the configuration in the edit mode described below is prior to the key binding. If both com1 and com2 are omitted, the registration of key binding for the key c is deleted.

break [n]
    Exit from the loop, it is used in the for statement and so on. If n is specified, it breaks n levels from the loop.

browse [-@ file]
browse com [-ftbie arg] [-p com2] [-dn {noprep,loop}] ...
    Execute com the command, and invoke the archive browser who receives its output. You should the macro representation quoted with " as com. -f, -t, -b, -i and -e options are the same as the one for launch the builtin command. In case that multiple coms are specified, the next com the command is executed one after another when you select each files in the archive browser, and the formats and patterns described after each com the command are adopted. In order to return to the previous level of archive browser, you should select the file named as .. or push the key [Bs]. Or you can use QUIT_SYSTEM the command to escape from all of the archive browsers invoked by browse. You must describe -f option, except for the last com the command. When the last com has no -f option, the command has been just executed instead of invoking an archive browser, and then will return to the previous archive browser when it is done. When you specify -p option, the execution of com2 the command precedes the execution of the next com the command when you select a file. While com is executed in the sub shell for a pipeline, com2 is executed in the current shell to inherit the values of internal variables set in this command after com2 has been done. The filenames which is selected toward this level of archive browser are held in positional parameters sequentially, and the last selected filename is held in $1. These parameters will be newly set whenever you select a file, so that they are reset in sequential order when you select the next file even if you replace them with set or shift the builtin command. -d and -n options specify a control if the selected file is a directory or not respectively. When you specify noprep, com2 specified by -p option is not executed. When you specify loop, you don't step the next com the command but the same com the command again. And when you think troublesome to describe too many arguments for browse, you can specify file the file in which some arguments are described with -@ option. You can describe -@ option in any place of arguments, the arguments described in file are inserted in the place where -@ is described. If you specify - as file, arguments are read from the standard input instead of the file. You should describe arguments in file with spaces or newlines as separator. The null line and the line started with # will be ignored. When you describe -@ option in file, the argument file is referred recursively.

builtin arg ...
    Execute arg as a simple builtin command. When the same named function is defined, the function will not be executed.

cd [-LP] [dir]
chdir [-LP] [dir]
    Change the current directory in fd to dir. If dir is omitted, it moves to the directory indicated by HOME the internal variable. If you specify the pathname as ".", "?", "-", "@", it behaves like as LOG_DIR. If -L is specified, the logical pathname following symbolic links is used. If -P is specified, the physical pathname following no symbolic links is used. Otherwise, the physical option for set the builtin command is effective.

checkid [file ...]
    Calculate the unique ID of the specified file and display it, according to the MD5 algorithm in RFC1321. When you specify multiple files, the IDs of all specified files are calculated and displayed. When you specify nothing, the ID of running fd itself is displayed. Since this algorithm is guaranteed to be secure, it is available to confirm the identity of files.

cls Clear the screen.

command [-p | -v | -V] arg ...
    Execute arg as a simple command. When the same named function is defined, the function will not be executed. If -p is specified, the default value of PATH is used to search the path. If -v is specified, the absolute path for arg is displayed instead of executing arg. In this case, arg the builtin command will cause simply its name. If -V is specified, verbose description for arg is displayed as same as type.

continue n
    Resume the next iteration in the loop, it is used in the for statement and so on. If n is specified, it resumes the next iteration in the loop n - 1 levels out of the loop.

copy [-ABVY-Y] src [-AB] [+ src2 [-AB] [+ ...]] [dest [-AB]]
    Copy the file indicated by src into the file or the directory indicated by dest. When dest indicates a directory, the filename in the destination is src. If dest is omitted, it is copied into the current directory. You can specify multiple source files by describing to separate them with +, or by using the wildcard. When you separate them with +, those files are concatenated and copied. When you use the wildcard, they are copied one by one in case that the destination is a directory, and they are concatenated in case that the destination is a file. When you specify -A, it is treated as the ASCII text file. When you specify -B, it is treated as the binary file. When you specify -V, it is verified to copy. When you specify -Y, it doesn't prompts for confirming to overwrite into the destination. When you specify --Y, it prompts for confirmation before overwriting into the destination. (MS-DOS version requires to use / instead of - as an option prefix for compatibility with COMMAND.COM.)

del [-P] file
erase [-P] file
    Delete the files indicated by file. You can specify multiple files by using wildcard. When you specify -P, it prompts for confirmation before deleting files. (MS-DOS version requires to use / instead of - as an option prefix for compatibility with COMMAND.COM.)

dir [-[-]PWSBLV4] [-A[DRHSA-]] [-O[NSEDGA-]] [dir]
    List files and sub directories in the directory indicated by dir. If dir is omitted, the information in the current directory is listed. When you specify -P, it prompts for every screen. When you specify -W, it is listed in the wide view. When you specify -A, it lists only the files which have the attribute indicated by the trailing character.
    D	directory	R	read only file
    H	hidden file	S	system file
    A	ready to archive	-	except it
    When you specify -O, it sorts with the sorted type indicated by the trailing character.
    N	by name	S	by size
    E	by extension	D	by date & time
    G	directory first	A	by last access time
    -	reverse order
    When you specify -S, it lists files in all sub directories. When you specify -B, it displays only names of files and directories. When you specify -L, it uses lowercase. When you specify -V, it lists the verbose information. When you specify -4, it displays year with 4 digits. And you can prefix - to any option letter to override the option. (MS-DOS version requires to use / instead of - as an option prefix for compatibility with COMMAND.COM.)

dirs
    Display the list of the current directory stack. Pushd and popd the builtin command can load/unload directories onto the directory stack.

disown [job]
    Remove the job specified with job from the shell control. The job to be disowned cannot be controlled by jobs, fg and bg. If invoked as a login shell, any jobs not to be disowned will be forced to exit when the shell finish. (UNIX) If job is omitted, the current job is removed from the shell control.

dtype file
    Display the contents of the file indicated by file.

echo [-nN] [arg ...]
    Echo arg to the standard output. When you don't specify -n, newline is added to output trailing after arg. When you specify -N, the outputted newline becomes CR-NL (\r\n). See echo(1) for details.

enable [-n] [arg ...]
    Enable arg as a builtin command. When you specify -n, it is disabled. If arg is omitted, all of the enabled or disabled builtin commands is listed.

eval [arg ...]
    Evaluate arg and execute the results.

evalmacro [arg ...]
    Evaluate parameter macros included in arg and execute the results. Since eval doesn't evaluate any parameter macro, you should choose them according to uses. When in the function, you cannot use any parameter macro, then you need this command to extract parameter macros.

exec [com [arg ...]]
    Execute com in place of the execution of fd. You can specify arg as arguments of com.

exit [n]
    Exit from fd. When you specify n, it exits with the exit status n.

export [NAME[=[value]] ...]
    Mark NAME the internal variable to be inherited to child processes as the environment variable. Since then, the definition of NAME can be referred in any child process. When you export the undefined internal variable, it doesn't become the environment variable until the internal variable is defined. When you want to define the value at the same time, you should specify value. If only = is specified and value is omitted, the value of NAME the environment variable is defined as a null. If no argument is specified, all of the exported environment variables is listed. When you want to delete the definition of the environment variable, you can use unset the builtin command.

false
    Only return with a 1 exit status.

fc [-l | -s [old=new ...]] [-nr ] [-e editor] [first [last]]
    List or edit command histories. First and last select the range of command histories. This specification can be described as a numeric value or a string. A positive value means the command history number, and a negative value means the command history which has the history number as the current history number minus the value. A string mean the command history which starts with the string. If -n is specified, command histories are listed without their history numbers. If -r is specified, command histories are listed in reverse order. If -e is specified, the editor named by editor is used to edit command histories, otherwise the editor specified by FCEDIT or EDITOR the internal variable is used. When -l is specified, selected command histories are listed to the standard output. In this case, omitting last means to specify the current history number, and also omitting first means to specify -16. When -s is specified, the command history selected by first is executed immediately. In this case, omitting first means to specify the current history number. The first occurrence of the string old in the command history will be replaced by the string new before execution. When neither -l nor -s is not specified, selected command histories are edited, and then each edited commands are executed one by one with display in the standard output. In this case, omitting last means to specify first, and also omitting first means to specify the current history number for both.

fd [directory [directory2]]
    Invoke fd from the internal shell. If you specify directory, the current directory is moved to the directory initially. If you specify directory2, the split window mode is invoked, and the current directory of the supplemental window is moved to the directory. You can return to the internal shell by QUIT_SYSTEM. It is effective only when it is invoked as fdsh.

fg [job]
    Continue the execution of the job specified with job in the foreground. The following format is available to specify a job. (UNIX)
    %
    %+	the current job
    %-	the previous job
    %n	the job with job number n
    %str	the job whose command line starts with str
    But, you must describe these % in the command line of EXECUTE_SH as the duplicated expression, such as %%, for the reason of the parameter macro function described below. If job is omitted, the current job is continued in the foreground.

getfreq [file]
    Output the contents of the translation frequency file, specified by file, to the standard output for the users Kana-Kanji translation learning. The output format provides one record per line, which consists of "Yomi-Gana", "word" and "frequency" separated by tab. You can use this output as the argument of setfreq to import the frequency information. If file is omitted, it is regarded as the translation frequency file specified by FREQFILE the internal variable. (UNIX)

getkey [num]
    Get the key code sequence for the pushed key. It prompts after executed, and displays the key code sequence for the key which you push to specify. It continues until you push any key num times. When num is more than 1 time, you can stop it with pushing [Space]. When num is 0 time, it continues forever until [Space] is pushed. The displayed sequence can be used as the key code sequence for keymap command. (UNIX) If num is omitted, it is regarded as 1 time is specified.

getopts optstr NAME [arg ...]
    Used to parse the optional parameters from a sequence of arg. The valid characters as option is described in optstr. An option character which needs an argument is described with following : in optstr. Each time getopts is invoked, the new option character parsed from arg is substituted for NAME the internal variable. When the option has an argument, the argument is substituted for OPTARG the internal variable. And the index of the next parameter is substituted for OPTIND the internal variable every time. The value of OPTIND is initialized to 1 whenever the shell is invoked, another parsing of option parameters needs initializing OPTIND to 1 manually. If arg is omitted, positional parameters are parsed to the optional parameters. When the end of option is encountered, getopts will exit with the value of 1. In this case, ? is substituted for NAME. When an option character which is not included in optstr is found, an error message is written to the standard error, then ? is substituted for NAME and OPTARG is unset. But, if OPTARG is started with :, no error message is written, and the found option character is substituted for OPTARG instead. When no argument is found with the option character which needs an argument, an error message is written to the standard error, then ? is substituted for NAME and OPTARG is unset. But, if OPTARG is started with :, no error message is written, then the found option character is substituted for OPTARG instead, and : is substituted for NAME.

hash [-r | com ...]
    Search the absolute path for com referring to PATH, which indicates the search path when the external command is executed, and register the result in the hash table. When you specify -r instead of com, all the memorized hash table is discarded. If com is omitted, the hash table information is listed. hits, cost, command indicate the number of times the command has been executed, the measure of the work required to search it in the search path, and the absolute path for the command, respectively. When the command is searched in a relative directory, it is necessary to re-search whenever the current directory is moved, because it is not registered as the absolute path. In such command, * trailing hits is displayed.

history [n]
    List the last n command histories with the history number. If n is omitted, all of the memorized command histories is listed.

jobs
    List the running jobs. (UNIX)

kconv [-i in] [-o out] [infile [outfile]]
    Read from infile and convert its Kanji code from in to out, and output to outfile. In in and out, you can specify the string which used in FNAMEKCODE the internal variable described below. If each of them is omitted, it is regarded as that the Kanji code specified in compile is specified. If outfile is omitted, it outputs to the standard output. If also infile is omitted, it reads from the standard input. (UNIX)

keymap [c [str]]
    Map the sequence str as key code of the special key c. You can use only the following identifiers as c. (UNIX)
    UP	Up	DOWN	Down
    RIGHT	Right	LEFT	Left
    BEG	Begin	EOL	Eol
    HOME	Home	END	End
    INS	Insert	DEL	Delete
    INSLIN	InsLine	DELLIN	DelLine
    PPAGE	PageUp	NPAGE	PageDown
    ENTER	Enter	BS	Bs
    CLR	Clear	HELP	Help
    PLUS	+ (tenkey)	MINUS	- (tenkey)
    ASTER	* (tenkey)	SLASH	/ (tenkey)
    COMMA	, (tenkey)	DOT	. (tenkey)
    EQUAL	= (tenkey)	RET	Return (tenkey)
    TK0..TK9	0-9 (tenkey)
    F1...F20	function key
    You can use the escape sequence in the key code sequence, such as \n =0x0a and \e =0x1b. You can also use the octal expression, such as \ooo. You can describe the control character prefixing ^, such as ^A. ^ itself can be described as \^. If str is omitted, the key code sequence for c is displayed. If both str and c are omitted, all of the mappings for special keys is listed. When you specify str as "", the key code mapping for c is canceled.

kill [-l | -signal] [pid | job ...]
    Send the signal indicated by signal to the process indicated by the process number pid or to the job indicated by job. Signal is described as a numeric value or a signal name. If signal is omitted, SIGTERM is send. When you specify -l, it lists the signal names which can be used as signal instead of sending a signal.

launch ext [com [format [top bottom]]]
launch ext com [-f format] [-t top] [-b bottom] [-ie patt]
    Register the behavior for ext the extension as the launcher. You should the macro representation quoted with " as com. When you register an archive browser, you should describe the command to list the archived files as com, and describe the format of the list as format. When you describe top and bottom, you can specify unnecessary lines in the list as the number of lines from the top/bottom line. When ext starts with /, uppercase/lowercase is ignored in the comparison of any extension. If com is omitted, the launcher registration for ext is canceled. When you register an archive browser, you can use the latter form to describe more detailed control. You can specify multiple formats as candidates with multiple -f options. These candidates for format are compared in order of appearance, if no one is matched completely then the nearest one is adopted. -i and -e options specify patt the pattern for the line to be ignored and for the line to be treated as error respectively. When the list includes unnecessary lines you can specify also top and bottom, but you must specify lines except top/bottom lines with -i option. In case that a failure to unpack files in the archive file causes outputting some strings, you can specify the strings with -e option. -i and -e options can specify multiple patterns, and they are effective if one of them is matched. And you can use a wildcard in the description for each patt the pattern.

md dir
    Create the directory dir.

mkdir dir
    Same as md. (DOS)

newgrp [arg ...]
    Execute newgrp(1) in place of the execution of fd. You can specify arg as arguments of newgrp(1). See newgrp(1) for details. (UNIX)

login [arg ...]
    Execute login(1) in place of the execution of fd. You can specify arg as arguments of login(1). See login(1) for details. (UNIX)

logout [n]
    Exit from a login shell. When you specify n, it exits with the exit status n.

popd
    Unload the top directory onto the directory stack, and change the current directory in fd to the directory. This command is failed when the directory stack is empty.

printarch [ext]
    Print the archiver commands registered for the archive file which has ext the extension. If ext is omitted, all of the registered archiver commands is listed.

printbind [c]
    Print the command binded to the key c. You can specify the key as well as bind. If c is omitted, all of the registered key bindings is listed, which is defined not as the internal command but as the command macro. The key bindings of internal commands can be referred in HELP_MESSAGE.

printdrv [c]
    Print the device file and the number of heads/sectors/cylinders of the floppy drive registered for the drive name c. (UNIX) If c is omitted, all of the registered floppy drives is listed.

printlaunch [ext]
    Print the command macro registered as the launcher for ext the extension. When it is registered as the archive browser, the format for listing is also printed. If ext is omitted, all of the registered launchers is listed.

printroman [roman]
    Print the Roman-Kana translation table for the Kana-Kanji IME mode. It means printing the Japanese string bound for roman the Roman string. (UNIX) If roman is omitted, all the registered Roman-Kana translation table is listed.

pushd [dir]
    Load the current directory onto the directory stack, and change the current directory in fd to dir. If you specify the pathname as ".", "?", "-", "@", it behaves like as LOG_DIR. The physical option for set the builtin command is effective for symbolic links. If dir is omitted, change the current directory to the top directory of the directory stack, and replace it with the current directory. In this case, this command is failed when the directory stack is empty.

pwd [-LP]
    Display the current directory with the absolute representation. If -L is specified, the logical pathname following symbolic links is displayed. If -P is specified, the physical pathname following no symbolic links is displayed. Otherwise, the physical option for set the builtin command is effective.

read [-N] [NAME ...]
    Read one line from the standard input and substitute that string for NAME the internal variable. The inputted string is separated with IFS into some words. When multiple NAMEs are specified, words are substituted one by one from the first of line, and all the rest are substituted for the last NAME. When the number of words in inputted string is less than the number of NAME, a null is substituted for the rest of NAME. If -N is specified, the newline of the line to be read is regarded as CR-NL (\r\n).

readline [prompt]
    Read one line from the terminal input and output that string to the standard output. When prompt is specified, the string is displayed on the beginning of input line. This command differs from read the builtin command in the terminal input and the line editing. You cannot use the history as one of the line editing, but can use the completion for a pathname.

readonly [NAME[=[value]] ...]
    Mark NAME the internal variable to be readonly. Since then, you cannot change the value of NAME. When you want to define the value at the same time, you should specify value. If only = is specified and value is omitted, the value of NAME the internal variable is defined as a null. If no argument is specified, all of the readonly internal variables is listed.

rd dir
    Delete the directory dir. You cannot delete the non-empty directory.

rmdir dir
    Same as rd. (DOS)

ren old new
rename old new
    Rename the filename or the directory name old into new. You can specify the wildcard in old and new to rename the multiple filenames all together.

rem [arg ...]
    No effect, same as :.

return [n]
    Return from a function with the return value specified by n. If n is omitted, the return value is the exit status of the last executed command. It cannot be used out of a function.

savetty [-n]
    Save the current terminal settings. The saved settings will be restored when EXECUTE_SH is executed later. In case that you change terminal settings with stty(1) and so on, you should save the settings with this command not to reset settings with the next execution of EXECUTE_SH. If you change terminal settings and execute this command not in the same command line, you should notice that this command will save the reset settings. If -n is specified, the saved settings will be cleared. (UNIX)

set [--abCefhkmntuvx] [-o option] [arg ...]
    List internal variables and functions, without any argument. When you specify arg, arg is substituted for the positional parameter $1, $2, ..., $n in order. When you specify any option, each option means the following. When you use + instead of -, the option parameter turns off each option.
    -a  Export any internal variable automatically when it is defined.
    -b  When a background job has been terminated, its status report will be displayed immediately. there is no effect when the job control is not enabled.
    -C  Prevent overwriting to any existent files in redirection.
    -e  Exit immediately when any command returns the exit status except 0.
    -f  Disable the wildcard expansion.
    -h  Register any command to the hash table just before it is executed. The commands used in a function are read when it is defined, and are registered to the hash table. The command hash itself is always valid, if -h option is set or not.
    -k  Treat all NAME=[value] formed arguments as the variable definition, while they are not placed on the beginning of command line string.
    -m  Enable the job control. This option is valid by default. (UNIX)
    -n  Read command inputs but don't execute them.
    -o option
        The following identifiers are valid in option.
        allexport
            Same as -a.
        autosavetty
            Same as -S.
        emacs
            Same as EDITMODE=emacs.
        errexit
            Same as -e.
        hashahead
            Same as -h.
        ignoreeof
            Any EOF will not terminate the interactive shell.
        keyword
            Same as -k.
        monitor
            Same as -m.
        noclobber
            Same as -C.
        noexec
            Same as -n.
        noglob
            Same as -f.
        notify
            Same as -b.
        nounset
            Same as -u.
        onecmd
            Same as -t.
        physical
            Same as -P.
        ptyshell
            Same as -T.
        verbose
            Same as -v.
        vi  Same as EDITMODE=vi.
        xtrace
            Same as -x.
        If option is omitted, the values of the current options are displayed.
    -P  Cd and pwd the builtin command use the physical directory structure instead of the logical directory structure following symbolic links.
    -S  Execute savetty the builtin command automatically whenever any command line is processed. The terminal settings will be saved absolutely unless you operate the terminal settings intentionally, so that you should manually adjust the terminal settings saved accidentally. (UNIX)
    -T  Invoke fdsh as the pseudo terminal. You cannot invoke any more pseudo terminals in this mode. It is effective only if you specify it as the startup option or in the initial configuration file. It is effective only if you specify it as the startup option, when the shell is executed as the non-interactive shell. It is just ignored when invoked as fd. (UNIX)
    -t  Exit immediately after executing the current command input.
    -u  Treat the reference of undefined variables as an error.
    -v  Display the command inputs whenever they are read.
    -x  Display the command strings whenever they are executed.
    --  Indicate the end of options. No flag is changed.

setdrv c device hd sc cl
    Specify the device file indicated by device for the MS-DOS floppy drive named as c. At the same time, hd, sc, cl are specified as the number of heads(sides)/sectors/cylinders(tracks) in the format which is treated in the driver of device. In special case, when you want to treat the 640KB2DD(hd=2/sc=8/cl=80) floppy disk with the driver which can treat only the 820KB2DD(hd=2/sc=9/cl=80) floppy disk, you should specify the value adding 100 (108) as the value of sc. (UNIX) On the PC-UNIX environment which is worked on PC, specifying the string HDD or HDD98 instead of hd, sc, cl, can register the MS-DOS partition on the hard disk for the PC/AT compatible machine or PC-9800 series. In this case, You should describe the device file as the device name prepared per the physical drive unit rather than the device name prepared per the partition (slice). The MS-DOS partitions included in the drive unit are automatically expanded to the drive name after the drive name c. When no MS-DOS partition is included in the specified drive unit, this command is ignored. You can confirm what drive name is valid by printdrv command. But any hard disk is registered as readonly, for security.

setfreq [file]
    Append the frequency information inputted from the standard input to the translation frequency file, specified by file, for the users Kana-Kanji translation learning. The input format is based on the output format of getfreq. If you want to replace, rather than to append, you must remove the translation frequency file in advance. If file is omitted, it is regarded as the translation frequency file specified by FREQFILE the internal variable. (UNIX)

setroman [-c] [-r] [-f file] [roman [kanji]]
    Setup the Roman-Kana translation table for the Kana-Kanji IME mode. It means binding kanji the Japanese string to roman the Roman string. The part over 4 characters of roman, the string which consists of 1 byte characters only, will be ignored. The part over 2 characters of kanji, the string which consists of multibyte characters or 1 byte characters, will be ignored. In this case, a multibyte character is counted as 1 character as well as a 1 byte character. (UNIX) If kanji is omitted, the registered binding of the Roman-Kana translation table for roman the Roman string will be deleted. When you specify -c, the whole Roman-Kana translation table will be cleared to be empty. When you specify -r, all the registered bindings will be reset to restore the Roman-Kana translation table. When you specify -f, the file specified by file will be read as bindings of the Roman-Kana translation table. In this case, a pair of roman and kanji, which is separated by spaces, must be described in each line of file. You can also use the file which contains the output of printroman.

shift [n]
    Rename the positional parameters from $n+1 into ones from $1 in order. The original positional parameters from $1 to $n are discarded. If n is omitted, it is regard as 1 is specified.

socketinfo [-apAP] [fd]
    If the file descriptor specified by fd is a socket, the IP address and the TCP port number of the connected remote host, and the IP address and the TCP port number of the connected local host, are outputted to the standard output. If fd is not a socket, this command will be failed. (UNIX) If fd is omitted, it is regarded as the standard input is specified. If -a is specified, only the IP address of the remote host will be outputted. If -p is specified, only the TCP port number of the remote host will be outputted. If -A is specified, only the IP address of the local host will be outputted. If -P is specified, only the TCP port number of the local host will be outputted.

test [expr]
[ expr ]
    Evaluate the conditional expression expr. See test(1) for details.

times
    Display the accumulated user and system time for the processes which has so far been executed.

trap [com] [n ...]
    Read and execute the command com when fd receives the signal n. If com is omitted, the trap for the signal is reset. When you specify com as a null, the signal ignored. When you specify n as 0, the command com is executed on exit. If both com and n are omitted, all of the registered traps is listed.

true
    Only return with a 0 exit status.

type [com ...]
    Display how each com would be treated when it is used as a command name.

ulimit [-SH] [-a | -cdflmnstv] n
    Set the resource limits for fd and its child processes to the value indicated by n. You can use the string unlimited or the numeric value in n, unlimited means the maximum specifiable value. (UNIX) When you specify -H, a hard limit is set. When you specify -S, a soft limit is set. When you don't specify neither of them, both limits are set. If n is omitted, the current limit is displayed. When you specify -a, all of the resource limits is displayed. When you specify the following options, the each resource limit is individually set or displayed. If no option is specified, it is regarded as -f is specified.
    -c  maximum core file size (in blocks)
    -d  maximum size of data segment (in KB)
    -f  maximum file size (in blocks)
    -l  maximum size of locked in memory (in KB)
    -m  maximum size of resident set (in KB)
    -n  maximum number of open file files
    -s  maximum size of stack segment (in KB)
    -t  maximum CPU time (in seconds)
    -v  maximum size of virtual memory (in KB)

umask [nnn]
    Set the file creation mask to nnn. If nnn is omitted, the current value of the file creation mask is displayed. See umask(2) for details.

unalias name
    Cancel the definition of the alias name. You can use the wildcard in name, in this case, all of the matched alias definitions is canceled. When you specify "*", all of the alias definitions is invalid.

unset [NAME ...]
    Delete the defined internal variable or function for each NAME. But the following variable definition cannot be deleted.
    PATH	PS1	PS2	IFS
    MAILCHECK	PPID

unsetdrv c device hd sc cl
    Delete the registered floppy drive. Only the registration with which all of device, hd, sc, cl is corresponded is deleted, then you should confirm to delete very well. (UNIX) When it is registered as HDD or HDD98 in setdrv, you should describe HDD or HDD98 instead of hd, sc, cl.

wait [pid | job]
    Wait for the process indicated by pid or for the job indicated by job, and return its exit status. If both pid and job are omitted, all running jobs are waited. (UNIX)

yesno [prompt]
    Wait for a input of y or n from the terminal, and then return 0 when y is inputted, return 255 when n is inputted. Instead of input of y or n, you can select a character from displayed [Y/N] with cursor keys and push [Return] to be regarded as an input of the selected character. An input of [Space] or [Esc] means the input of n. When prompt is specified, the string is displayed before [Y/N].

COMMAND [arg]
    Execute the internal command COMMAND of fd. You can describe each command identifier in COMMAND. The following internal commands can take a parameter argument arg.
    CUR_UP
    CUR_DOWN
    CUR_RIGHT
    CUR_LEFT
    ROLL_UP
    ROLL_DOWN
    WIDEN_WINDOW
    NARROW_WINDOW
        The number of lines, columns, or pages.
    RENAME_FILE
    PACK_FILE
    BACKUP_TAPE
        The filename.
    LOG_DIR
    MAKE_DIR
    INFO_FILESYS
    UNPACK_FILE
        The directory name.
    EXECUTE_SH
        The command string.
    MARK_FIND
    FIND_FILE
    FIND_DIR
        The wildcard string.
    MARK_ALL
        0 will reset the mark of all files, the other will mark all files.
    SORT_DIR
        The number substituted for SORTTYPE the internal variable.
    EDIT_CONFIG
        The name of internal variable to be edited.

~ and $ in the previous registration string are expanded. But these expansions are restrained in the string quoted with ' instead of ".

  Tree Screen
Since representing the whole file system in tree structure takes too many time, only the directories which are direct ancestors and the direct sub directories are displayed, first in the tree screen. In the directories which are direct ancestors, the other sub directories (if exists) are grouped as "...". These grouped sub directories will be expanded automatically when a cursor is placed on its position. The sub directories which are not expanded yet are represented with '>' trailing the filename, which shows as they are. Such directory is never expanded until it is required to expand explicitly, then you should expand it by the following key inputs before moving to any hidden sub directory. In the tree screen, the following key inputs are available.
    Up, Down
        Move a cursor.
    Right
        Expand the sub directory on the cursor position.
    Tab Expand the sub directory on the cursor position recursively.
    PageUp, PageDown
        Move a cursor by half screen.
    Home(<), End(>)
        Move a cursor to the top/bottom of tree.
    ?   Move a cursor to the current directory.
    Bs  Move a cursor to the parent directory.
    Left
        Group sub directories of the directory on the cursor position, or move a cursor to the parent directory.
    (, )
        Move a cursor to the previous/next directory among the same level sub directories.
    A - Z
        Move a cursor to the directory whose name starts with the character or its lowercase.
    l   Change the directory tree into the specified directory. Moving to the floppy drive is also available.
    ^L  Redraw the tree structure.
    Return
        Select the directory.
    Esc Cancel.

When directories are recursively expanded, the machine operation is so late that it maybe seems to freeze. In this case, you can input any key while operating. If key input is recognized while expanding directories, expanding has been stopped at that moment in spite of not finishing. Even if key repeat keeps effective, any operation will be delayed for this function.

  Archive Browser
When the launcher is invoked on the position of the file whose extension is registered to associate with an archive browser, the archive browser screen has come. In this screen, you can browse files in the archive file as well as in the normal directory. But you cannot use the following internal commands in this screen.
    LOG_TOP	ATTR_FILE	COPY_FILE	MOVE_FILE
    DELETE_FILE	DELETE_DIR	RENAME_FILE	MAKE_DIR
    WRITE_DIR	TREE_DIR	EDIT_FILE	LOG_TREE
    COPY_TREE	MOVE_TREE	FIND_DIR	ATTR_DIR
    SYMLINK_MODE	DOTFILE_MODE	FILEFLG_MODE	SPLIT_WINDOW
    KILL_WINDOW
When you want to register a new archive browser, you must describe the format listed by the archiver as the following representation. One format string represents the format for 1 file in the list.
    %a	Field which indicates a file mode
    %u	Field which indicates UID of a file
    %g	Field which indicates GID of a file
    %s	Field which indicates a file size
    %y	Field which indicates a file creation year
    %m	Field which indicates a file creation month
    	(No concerning if numeric or alphabetical)
    %d	Field which indicates a file creation day
    %w	Field which indicates a file creation week (ignored)
    %t	Field which indicates a file creation time
    	("HH:MM:SS" form, MM and SS can be lacking)
    %p	Field which indicates a file creation am/pm
    %B	Field which indicates a major device ID
    %b	Field which indicates a minor device ID
    %/str/	Field which indicates a type is directory
    	when this field string is str
    	(case insensitive)
    %!str!	0 or more continuous fields
    	which consists of the string str
    	(case insensitive)
    %f	Field which indicates a filename
    %x	Field which is needless (ignored)
    %%	% itself
    \n	Newline
    Space Tab 0 or more characters of spaces or tabs

In this description, the field means the area separated by spaces, tabs or newlines. When the string which indicates each information is separated by these characters, you can simply describe the above string which indicates that field. When the string is separated by another character, you should describe the above string with that separator. You can describe to indicate the field length as numeric, such as %10a. This example means that the field which indicates a file mode consists of 10 characters. If you describe it with a character * as the field length instead of numeric, such as %*f, the string to the end of line is regarded as a field, in which any space and tab will be ignored. When a field may have the different meanings according to situation, you should describe it quoted with { }, such as %{yt}. This example means that this field indicates a creation year or a creation time. When the information for 1 file consists of multiple lines, you should place a \n on the position of newline in the format string. For example, the following are the format strings for the list of some archivers. While some spaces are used here for easiness to see, these spaces are not always necessary because any space between fields is ignored.
`lha l'
    "%9a %u/%g %s %x %m %d %{yt} %f"
`lha v' (MS-DOS)
    "%f\n%s %x %x %y-%m-%d %t"
`tar tvf' (BSD)
    "%9a %u/%g %s %m %d %t %y %f"
`tar tvf' (SVR4)
    "%a %u/%g %s %m %d %t %y %f"

If you register archive browsers with above format, in the builtin command of EXECUTE_SH or in the initial configuration file, you can use the archive browser which is not prepared by default. But, if you want to execute or view files in the archive file, you must register the archiver command for the archive file, too, don't forget this. On some OS, tar(1) may output the Japanese timestamp when japanese is substituted for LANG the environment variable. Since fd cannot analyze the representation like this, you should describe `export LANG=C' in the initial configuration file, or specify LANG in the description of listing command, such as `LANG=C tar tvf'.

  Floppy Drive (UNIX)
You can access the MS-DOS formatted floppy disk, by representing to prefix "c:" to the directory name. But, it is necessary to register the floppy drive and set DOSDRIVE the internal variable which makes this function effective, in advance. Each registered drive is distinguished with the drive name. You should tag the physically different drive as the different drive name. When the same physical drive supports multiple formats, you can register each format with the same drive name, or the different drive name each other. If you tag the same drive name, the justice of the format is tried in registered order, so that you should register the format which you often use in the first place. Each drive of the floppy drive has the its own current directory. The default value of this is a root directory, and the current directory is moved back to a root directory again whenever you change a floppy disk. When you describe the directory name as starting with '/' after ':', it means the absolute path representation of that drive. If this '/' is not exist, it means the relative path representation from the current directory of that drive, don't forget this. Regrettably, some internal commands like as WRITE_DIR, INFO_FILESYS cannot support the floppy drive. Some filenames are renamed when they are copied from UNIX for reason of the filename length limit. When you use a lowercase letter as the drive name, you can access it as the floppy drive which can treat the Long File Name (LFN) for MS-Windows formatted floppy disk. In this case, you can copy a file with a long filename on UNIX as it is. But, when the UNICODE translation table fd-unicd.tbl does not exist in the same directory as the invoked fd exists, any Kanji filename cannot be treated as LFN representation. Reversely, when you use a uppercase letter as the drive name, LFN is ignored and 8+3 formed filename is treated. MS-DOS version inherits this specification by the case of a drive name.

  URL Drive (UNIX)
You can access remote services on the network, by representing the URL string as the directory name. The URL format is scheme://[user[:password]@]host[:port]/directory/. You can specify ftp or http as scheme. You can specify the name or IP address of the remote host as host. You can specify the TCP port number as port. If port is omitted, the default port number is used. The default port number for ftp is 21, and the default port number for http is 80. You can specify account information to connect the remote host as user and password. If user is omitted, the anonymous FTP connection will be used with ftp, or you will be queried as needed with http. If password is omitted, you will be queried as needed. But, it is necessary to set URLDRIVE the internal variable which makes this function effective, in advance. Regrettably, some internal commands cannot support the URL drive, for the sake of restrictions of the FTP and HTTP protocols or settings of the host side.

  String Input
When you input the string, such as the pathname, the following key inputs are available. The kind of referred history differs with the input string required. In the split window mode, the current directory of another window is always placed on the top of the pathname history.
Left, Right
    Move a cursor.
Up, Down
    Refer the previous histories (only commands and pathnames), or move a cursor.
Beg Move a cursor to the beginning of string.
Eol Move a cursor to the end of string.
Ins Switch a input method to the insert/overwrite mode. (Default value is the insert mode.)
Del Delete a character on the cursor position.
Bs  Delete a character before the cursor position.
DelLine
    Delete a string after the cursor position.
InsLine
    Treat the next input character as it is, effective to input control characters.
Enter
    Insert a filename of the file on the cursor position.
PageUp
    Convert a character on the cursor position to uppercase.
PageDown
    Convert a character on the cursor position to lowercase.
Tab Complete a pathname, a command name or a variable name on the cursor position.
    When there are two or more completion choices, inputting this continuously can display the completion choice list. Except for command line in the internal shell, you can make a choice from this list with cursor keys and [Return].
^L  Redraw the input string.
^S, ^R
    Search the previous histories (only commands and pathnames) incrementally.
Return
    Decide the input, or decide the choice in the completion choice list.
Esc Cancel.

The inputted string is expanded before evaluation as following. These expansions are also valid in the string of command macros. But these expansions are restrained in the string quoted with the quotation mark '.

~   Indicate your home directory, when it is the beginning of filename.

~user
    Indicate user's home directory, when it is the beginning of filename. (UNIX)

~FD Indicate the directory where the invoked fd is exists, when it is the beginning of filename.

$NAME
${NAME}
    Indicate the value of NAME the internal variable or the environment variable. When both are defined, the internal variable is prior. When both are undefined, it is replaced a null. The brace { } separates NAME from its trailing characters. When NAME is the following character, it is replaced by the value substituted automatically by the shell.
    0   The executable filename when invoked.
    [1-9]
        The positional parameter.
    *   The all positional parameters which starts from $1. "$*" is replaced by "$1 $2 ...".
    @   The all positional parameters which starts from $1. "$@" is replaced by "$1" "$2" ... .
    #   The number of positional parameters.
    -   The option flags which is set by options when invoked or set the builtin command.
    ?   The exit status of the last executed command.
    $   The process number of the current shell.
    !   The process number of the last executed background process.

${NAME:-word}
    If the value except a null is substituted for NAME the internal variable or the environment variable, it is replaced by the value, otherwise it is replaced by word.

${NAME:=word}
    If the value except a null is substituted for NAME the internal variable or the environment variable, it is replaced by the value, otherwise word is substituted for NAME the internal variable, and this expression itself is replaced by word. But you cannot substitute the value for any positional parameter.

${NAME:?word}
    If the value except a null is substituted for NAME the internal variable or the environment variable, it is replaced by the value, otherwise display word and exit from the shell. If word is omitted, the string ``parameter null or not set'' is displayed in its place.

${NAME:+word}
    If the value except a null is substituted for NAME the internal variable or the environment variable, it is replaced by word, otherwise it is replaced by a null.

${NAME-word}
    If any value is substituted for NAME the internal variable or the environment variable, it is replaced by the value, otherwise it is replaced by word.

${NAME=word}
    If any value is substituted for NAME the internal variable or the environment variable, it is replaced by the value, otherwise word is substituted for NAME the internal variable, and this expression itself is replaces by word. But you cannot substitute the value for any positional parameter.

${NAME?word}
    If any value is substituted for NAME the internal variable or the environment variable, it is replaced by the value, otherwise display word and exit from the shell. If word is omitted, the string ``parameter null or not set'' is displayed in its place.

${NAME+word}
    If any value is substituted for NAME the internal variable or the environment variable, it is replaced by word, otherwise it is replaced by a null.

${#NAME}
    It is replaced by the length in characters of the value of NAME the internal variable or the environment variable. If NAME is * or @, it is replaced by the number of positional parameters instead of the length of characters.

${NAME%word}
    It is replaced by the string in which the smallest portion of the suffix matched by the word pattern is deleted from the value of NAME the internal variable or the environment variable. If NAME is * or @, each positional parameter is replaced. ( \ is used instead of % on MS-DOS version.)

${NAME%%word}
    It is replaced by the string in which the largest portion of the suffix matched by the word pattern is deleted from the value of NAME the internal variable or the environment variable. If NAME is * or @, each positional parameter is replaced. ( \\ is used instead of %% on MS-DOS version.)

${NAME#word}
    It is replaced by the string in which the smallest portion of the prefix matched by the word pattern is deleted from the value of NAME the internal variable or the environment variable. If NAME is * or @, each positional parameter is replaced.

${NAME##word}
    It is replaced by the string in which the largest portion of the prefix matched by the word pattern is deleted from the value of NAME the internal variable or the environment variable. If NAME is * or @, each positional parameter is replaced.

\c  It indicates a character c itself. You can use it when you want to use the preceding meta-character as a character with no evaluation, such as ~ or $. You can describe \ itself as "\\". But, on MS-DOS version, because \ which is used as the pathname delimiter must be treat as well as the normal character, %c is expediently used in place of \.

The following is replaced only in the shell which is executed by EXECUTE_SH and EXECUTE_FILE.

`list`
    List is executed and this string is replaced by its standard output.

$(list)
    List is executed and this string is replaced by its standard output like as `list`. This differs from `list` in the point that nested expressions are allowed. And any meta-characters such as quotes in list are evaluated as it is.

$((expression))
    Expression the arithmetic expression is evaluated and this string is replaced by its result value. You can specify numeric values, variables and integral calculations with the following operators in expression.
    	(unary)	(binary)
    arithmetic	+ -	+ - * / %
    boolean	!	== != < > <= >= && ||
    bit operator	~	& | ^ << >>
    parenthesis	( )

?
*
[
]   The string including these letters is pattern-matched with existent files. When it is matched, it is replaced by all of the matched filenames which are sorted in alphabetical order.
    ?   Match any single character except /.
    *   Match any 0 or more length string not including /.
    **  Match any 0 or more length string including /.
    [...]
        Match any one of the characters enclosed by [ ]. When enclosed characters include -, it matches any character whose character code is between characters before/after -.
    [!...]
        Match any one of the characters not enclosed by [ ].

    But, when the first character of the filename is ., ?, * and ** don't match it.

  Edit Mode
When you want to use some functions bound to special keys, such as a cursor key or a scroll key, such a key doesn't exist in some terminals. In such a case, substituting the string for EDITMODE the internal variable can make you use some control keys as alternative to these special keys. Since this alternative key function is prior to the key binding by the builtin command, the key binding is invalid for the control characters used as the alternative keys. The prepared edit modes are the following 3 modes.

emacs
    ^P	= Up	^A	= Beg
    ^N	= Down	^E	= Eol	^D	= Del
    ^F	= Right			^Q	= InsLine
    ^B	= Left			^K	= DelLine
    ^V	= PageDn	^Y	= PageUp	^O	= Enter
    ^M	= Return	^I	= Tab	^H	= Bs
    ^[	= Esc	^G	= Esc

wordstar
    ^E	= Up	^A	= Beg	^V	= Ins
    ^N	= Down	^F	= Eol	^G	= Del
    ^F	= Right	^W	= Home	^]	= InsLine
    ^S	= Left	^Z	= End	^Y	= DelLine
    ^C	= PageDn	^R	= PageUp	^N	= Enter
    ^M	= Return	^I	= Tab	^H	= Bs
    ^[	= Esc

vi  Vi mode has the 2 local modes: "insert mode" and "command mode", and the function of keys are quite different with each mode. You are in the command mode when you start to input, then you must input any key among 4 keys which switch to the insert mode, in order to input normal keys.
    (command mode)
    k	= Up	0	= Beg
    j	= Down	$	= Eol	x	= Del
    l	= Right	g	= Home
    h	= Left	G	= End	D	= DelLine
    ^F	= PageDn	^B	= PageUp	o	= Enter
    ^M	= Return	^I	= Tab	^H	= Bs
    ^[	= Esc
    (from command mode to insert mode)
    i, :	= only switch its mode
    		I	= + Beg
    a	= + Right	A	= + Eol
    R	= overwrite
    r	= overwrite once
    (insert mode)
    ^V	= InsLine	Esc	= to command mode
    This key binding is so particular that it is not suitable for those who don't use vi editor everyday.

  Kana-Kanji IME (UNIX)
You can input strings in the Kana-Kanji IME mode, if you input the key specified by IMEKEY or select "Kanji" from the pseudo terminal menu. The translation performance will depend on the Kana-Kanji translation dictionary fd-dict.tbl. When it does not exist in the same directory as the invoked fd exists, translation to Kanji will not be available. The standard installed dictionary file is the Tan-Kanji dictionary, which can support only the Tan-Kanji translation. The dictionaly such as the pubdic, which includes the Hinsi information, will bring you the Tan-Bunsetsu translation. The Ren-Bunsetsu translation is not be supported. In the Kana-Kanji IME mode, the following key inputs are available.
    Space
        Trancelate to Kanji, or select the next translation candidate.
    Left, Right
    Up, Down
        Move a cursor in the list of the translation candidate.
    Bs, Del
        Delete a character before the cursor position.
    Tab Toggle Hiragana, Katakana, Hankaku-Kana and the direct input.
    ^L  Redraw the input string.
    Return
        Decide the translation result.
    Esc Cancel.

When you translate the string of the capital 4 digit hexadecimal prefixed by a capital letter, it is regarded as the hexadecimal showing the following Kanji code respectively. Then the menu will be displayed to select Kanji next to the Kanji code number.
    S   Shift JIS
    E   EUC-JP
    J   JIS code (JIS X0208)
    K   Kuten code
    U   UNICODE (UCS2)
When you input [Space] in the state where you decide an un-translated Kana, it is regarded as the initial reading of Kanji. Then the menu will be desplayed to select Kanji whose reading starts with the Kana.

  Parameter Macros
You can use the following parameter macros in the string which is used for the registration of command macros and for executing command. But, you cannot use them in the functions, the input file for source command, and the initial configuration file, then you should use evalmacro command when you want to use any parameter macro in them.

%C  The filename on the cursor position. Or, it indicates the archive filename, in the macro to register the archiver command.

%X  The filename except its extension on the cursor position. Or, it indicates the archive filename except its extension, in the macro to register the archiver command. Only the last one extension is removed. T, TA, M trailing %X are replaced by %T, %TA, %M except its extension respectively. On MS-DOS version, you can describe a trailing S as well as them.

%P  The pathname of the current directory.

%K  Prompt and return to fd after a command is finished. But, the meaning of %K is reverse in EXECUTE_FILE and EXECUTE_SH; it prompts by default and doesn't prompt if %K is specified. You can never specify to prompt in macros to register the archive browser of the launcher and macros to register the archiver command.

%T  List marked files separated by spaces as possible. When files are so many that the command line length exceeds the OS limitation, the rest of marked files are ignored.

%TA List marked files as well as %T, and repeat the same command for spilt files to complete all marked files.

%M  Execute the same command as many times as marked files, sending the marked file one by one. It is useful to mark files by MARK_FIND and execute "mv %M %XM.bak" by EXECUTE_SH.

%N  Restrain the filename addition even if the parameter is omitted.

%R  Make you input the additional parameter in executing a macro, if the length of command string has enough margin. The cursor position in input is placed on the position of %R in a macro. But, %R is ignored in macros to register the archive browser of the launcher, macros to register the archiver command, and EXECUTE_FILE, EXECUTE_SH.

%S  The 8+3 formed filename with which the LFN formed filename on the cursor position is replaced. You can use it when you use external commands which can treat only 8+3 formed arguments. T, TA, M trailing %S can be described as well as %X. (DOS)

%JS The Kanji code of the string enclosed by this macro is converted into Shift JIS. (UNIX)

%JE The Kanji code of the string enclosed by this macro is converted into EUC-JP. (UNIX)

%J7 The Kanji code of the string enclosed by this macro is converted into 7bit JIS. (UNIX)

%J8 The Kanji code of the string enclosed by this macro is converted into 8bit JIS. (UNIX)

%JJ The Kanji code of the string enclosed by this macro is converted into ISO-2022-JP. (UNIX)

%JH The Kanji code of the string enclosed by this macro is converted into HEX. (UNIX)

%JC The Kanji code of the string enclosed by this macro is converted into CAP. (UNIX)

%JU The Kanji code of the string enclosed by this macro is converted into UTF-8. (UNIX)

%JM The Kanji code of the string enclosed by this macro is converted into UTF-8 for Mac OS X. (UNIX)

%JI The Kanji code of the string enclosed by this macro is converted into UTF-8 for iconv, which is used on environments using iconv-based UTF-8 such as Linux. (UNIX)

%JA The Kanji code of the string enclosed by this macro is converted into the Kanji code which is used in the pathname indicated by the string. The variables SJISPATH, EUCPATH, etc. can specify what kanji code is used in each pathname. (UNIX)

When no filename parameter, such as %C and %T, is taken with the result to expand parameter macros in a command macro, the filename on the cursor position is automatically added to the last of expanded string, as ./filename form. This addition is not done, in case of the input string for executing command, or when %N macro is specified.

  Customize
You can customize fd as the following ways. If you specify some configuration in multiple ways overlapped, it is prior in this order.

    Executing builtin commands with EXECUTE_SH
        You can execute builtin commands for each registration for the internal variable definition, the environment variable definition, the alias definition, the function definition, the key binding, the keymap changing, the launcher registration, the archiver command registration, and the floppy drive registration.

    Customizer
        EDIT_CONFIG command is available for the internal variable definition, the key binding, the keymap changing, the launcher registration, the archiver command registration, and the floppy drive registration.

    Command line options
        You can specify the command line options as `-NAME=value' form, to define the internal variables.

    .fd2rc
        You can prepare the initial configuration file .fd2rc on your home directory, to execute the command which is written in this file, before the startup of fd. You can describe builtin commands and external commands in it to set up each configuration. Yet, when fdsh is invoked as a login shell, .fdshrc is read instead of .fd2rc. The initial configuration file /etc/fd2rc which is prepared by a system administrator is read preceding .fd2rc and .fdshrc. If this file exists, the initial configurations prepared by a system administrator are valid unless you intentionally delete them in .fd2rc and .fdshrc. (On MS-DOS version, these filenames are $HOME\fd2.rc, $HOME\fdsh.rc and ~FD\fd2rc.)

    Environment variables
        Any valid variable name as the internal variable can be valid to be defined as the environment variable in advance. But the internal variable is always prior to the environment variable in fd. When the same named environment variable is used in another application, you can also use the name which FD_ is prefixed to each environment variable for fd only. This environment variable with FD_ is always prior to the environment variable without it, then the definition of the environment variable with FD_ is prior to the definition of the internal variable without FD_.

  Customizer
EDIT_CONFIG command invokes the customizer to set up configurations interactively. You can select the category with the right/left cursor key, and select the item with the up/down cursor key, and change its content with [Return]. When you finish to change, exit from the customizer with [Esc]. The following categories are prepared.
    Variables
        Change the value of internal variables. The input method is different with the variable, then you should input following the guidance on screen.
    Key bind
        Change the command bound to each key. When you newly bind a command to the key with no binding, you should select "NewEntry". If you select "Delete bind", the existent key binding is deleted.
    Key map
        Change the key code mapping for each special key. If you push [Esc] when you are prompted to push the key, the existent key mapping is deleted. (UNIX)
    Launcher
        Change the launcher registration for each extension. When you newly register a launcher for the extension with no registration, you should select "NewEntry". If you input a null line when you input a command for the launcher, the existent launcher registration is deleted.
    Archiver
        Change the archiver command registration for each extension. When you newly register a archiver command for the extension with no registration, you should select "NewEntry". If you input a null line both when you input a command for pack/unpack, the existent archiver command registration is deleted.
    DOS drive
        Change the floppy drive registration. When you newly register a floppy drive for the drive name with no registration, you should select "NewEntry". If you input a null line when you input a device name, the existent floppy drive registration is deleted. (UNIX)
    Save
        Save the configurations changed with the customizer into a file, or cancel configurations to restore to the previous state.
        Cancel
            Cancel the changed configurations within the specified categories, and restore to the state before the customizer is invoked.
        Clear
            Cancel all the configurations within the specified categories, and restore to the default state.
        Load
            Load configurations from the specified file.
        Save
            Save all the configurations within the specified categories to the specified file.
        Overwrite
            Overwrite all the configurations within the specified categories to the specified existent file. The original configurations which has existed in the file are parsed, and the configuration for the same target is overwritten at the same place as possible. The configurations which are not set up at present and the configurations which are not supported by the customizer are remains as it is.

        When you specify the range of categories, all categories are selected by default, then you should turn on/off each selection with [Space] and decide with [Return].
If you try to exit from the customizer without saving after changing any configuration, you will be confirmed whether if it is right to exit without saving. While the changed configurations themselves are valid even if you exit without saving, when you want them to be valid in the next invoked fd, you must save them into the initial configuration file.

ENVIRONMENT VARIABLES
The following environment variables are valid in fd. These environment variables can be valid if they are defined as the internal variables. You can specify them as the command line options in `-NAME=value' form. But the variables followed by * cannot be use with the prefix FD_ as the environment variables.

ADJTTY
    Reset the terminal mode forcedly to the normal state, when fd is finished. Invoking fd can adjust the terminal rightly from the state displaying broken characters. Any value except 0 and null effects valid. (UNIX)

ANSICOLOR
    Colorize the file display. When the terminal which you use supports the color control escape sequence of ANSI standard, each file is displayed with color according to its file type. If the value is 1, it is colorized. If the value is 2, the background color is forced to be black, for the case that the foreground color is the same as the background color and indistinguishable. If the value is 3, the foreground color is forced to be black.

ANSIPALETTE
    Specify color palette according to file type when the file display is colorized. This variable value consists of a numeric value whose maximum columns are 11 columns. The number of each column shows a color number, which specifies the color of file type corresponding with its column. The following are correspondence of the column number to the file type.
    1	normal file
    2	background
    3	directory
    4	unwritable file
    5	unreadable file
    6	symbolic link
    7	socket (or system file on MS-DOS)
    8	FIFO (or label on MS-DOS)
    9	block device
    10	character device
    11	executable file
    The following are the meaning of color number specified on each column.
    0	black
    1	red
    2	green
    3	yellow
    4	blue
    5	magenta
    6	cyan
    7	white
    8	default color for foreground
    9	default color for background
    The color number 8 is forced to be black, if the value of ANSICOLOR the variable is 3. The color number 9 is forced to be black, if the value of ANSICOLOR the variable is 2.
    When the columns are less than 11 or this variable is not set, the standard color palette will be applied for the file type corresponding with the following columns. The standard color palette is described with the above color number as 89624351888.

AUTOUPDATE
    Specify the interval in seconds to update automatically the browser screen or the tree screen. When the key input idles for the specified seconds, the current information of file list will be updated. If this value is 0, the screen will never updated automatically. The default value is 0.

BASICCUSTOM
    Limit the internal variables for configuration only to basic variables in the customizer, to hide advanced variables. Any value except 0 and null effects valid.

CDPATH*
    Specify the search path when an argument of cd the builtin command does not start with /. You can specify multiple paths separating with ':'. No search path is specified by default.

COLUMNS*
    The variable for the columns of a terminal screen. If some value is set, this value will be replaced automatically according to changing the screen size. If no value is set, this value will remain unset.

COMSPEC
    Specify the shell used to invoke a batch file. If undefined, the shell defined by SHELL the internal variable or \COMMAND.COM is used. (DOS)

COPYCMD*
    Specify the default options used by copy the builtin command.

DEFCOLUMNS
    Specify the columns displayed in the screen when fd is invoked. The default value is 2. If you specify the value except 1, 2, 3 and 5, it is ignored.

DEFKCODE
    Specify the system default Kanji code. The arguments passed to external commands invoked from fd will be converted into the specified Kanji code. When you use macros such as %C and %JJ, it will be converted into the Kanji code according to each macro. JIS8, JUNET, HEX, CAP, etc. among them are the Kanji codes used in Samba. (UNIX)
    SJIS, sjis	Shift JIS
    EUC, euc	EUC-JP
    JIS, jis	7bit JIS
    JIS8, jis8	8bit JIS
    JUNET, junet	ISO-2022-JP
    OJIS, ojis	7bit JIS (JIS C6226-1978 + roman)
    OJIS8, ojis8	8bit JIS (JIS C6226-1978 + roman)
    OJUNET, ojunet	ISO-2022-JP (JIS C6226-1978 + roman)
    HEX, hex	HEX
    CAP, cap	CAP
    UTF8, utf8	UTF-8
    UTF8-mac, mac	UTF-8 for Mac OS X
    UTF8-iconv	UTF-8 for iconv
    default	no convert

DIRCOUNTLIMIT
    Specify the maximum number of files read from the directory in the tree screen. When the directory trailed by '>' has no sub directory, the expanded result is not changed. If the number of files (including directories) in the directory is within this value, the directory with no sub directory is not trailed '>' from the first. Moreover, the file list in the directory displayed on the right of screen is not displayed over this value. If this value is 0, you can realize a comfortable operation speed even in the slow machine. The default value is 50 files.

DIRCMD*
    Specify the default options used by dir the builtin command.

DIRHIST
    Specify the maximum number of the directory histories which can be referred by the directory input line. The default value is 50. If this value is 0, you can refer to no directory history.

DIRHISTFILE
    Specify the name of the directory history file which can be referred by the directory input line. Unless you specify it, the directory history is not loaded nor saved. The default value is not specified.

DIRHISTUMASK
    Specify the file creation mask with octal expression for the directory history file. It is used only if no existent file exists. But the mask value set by umask the builtin command is prior, then actual mask value is the logical OR of this value and umask value.

DISPLAYMODE
    Specify the filename display mode of the file list when fd is invoked. Each of the symbolic link mode, the file type symbol mode and the dot file display mode can be selected individually. The default value is 0. The following are specifiable values.
    0	standard
    1	SYMLINK
    2		FILETYPE
    3	SYMLINK &	FILETYPE
    4			DOTFILE
    5	SYMLINK &		DOTFILE
    6		FILETYPE &	DOTFILE
    7	SYMLINK &	FILETYPE &	DOTFILE
    Moreover, on the OS which supports the file flag, if you specify the value adding 8 to each value, you can select the file flag display mode.

DOSDRIVE
    Validate the access function to the MS-DOS floppy. If no floppy drive is registered, this validation cannot make you access the floppy. Any value except 0 and null effects valid.
    On MS-DOS version, This definition can make you treat the LFN formed filename in the old DOS before Ver. 6.xx. In this case, you don't have to register any floppy drive. the access speed may be slow or some functions may be restricted for the reason to operate the disk I/O not by way of OS.

DUMBSHELL
    Don't use any control sequences to edit command line in the internal shell. In the internal shell, the cursor addressing of terminal mode is not valid. In case of some terminal such as a console terminal, the cursor addressing cannot work correctly in this terminal mode, and the editing string is displayed incorrectly. When this variable is valid, while no control sequence is used to edit command line, an inefficient cursor addressing will cause restriction of some functions and failure of response. Any value except 0 and null effects valid.

EDITMODE
    Specify the edit mode of key input as the string. The default value is emacs. The value except emacs, wordstar and vi or null are specified, any control character is not converted and will be sent as it is.

EDITOR
    Specify the editor command used for editing files.

ENV*
    Specify the additional initial configuration file when invoked as fdsh. You must specify its filename as fullpath. When this variable is set, the initial configuration file is read after /etc/fd2rc, and before .fd2rc or .fdshrc. This value will be ignored if your real and effective UIDs or real and effective GIDs are different.

FCEDIT
    Specify the editor command used for fc the builtin command.

FD_VERSION
    A version string of the running fd.

FNAMEKCODE
    Specify the Kanji code for filename. Any filename is converted into the specified Kanji code at the point of accessing the file, then you can refer to the file which has a Kanji filename from another machine on network which use a different Kanji code. The archive browser and browse the builtin command also refer the specified Kanji code. JIS8, JUNET, HEX, CAP, etc. among them are the Kanji codes used in Samba. (UNIX)
    SJIS, sjis	Shift JIS
    EUC, euc	EUC-JP
    JIS, jis	7bit JIS
    JIS8, jis8	8bit JIS
    JUNET, junet	ISO-2022-JP
    OJIS, ojis	7bit JIS (JIS C6226-1978 + roman)
    OJIS8, ojis8	8bit JIS (JIS C6226-1978 + roman)
    OJUNET, ojunet	ISO-2022-JP (JIS C6226-1978 + roman)
    HEX, hex	HEX
    CAP, cap	CAP
    UTF8, utf8	UTF-8
    UTF8-mac, mac	UTF-8 for Mac OS X
    UTF8-iconv	UTF-8 for iconv
    default	no convert

FREQFILE
    Specify the translation frequency file for the users Kana-Kanji translation learning. If the filename is not defined, the frequency information will not be saved nor be referred. The default value is ~/.fd_freq. (UNIX)

FREQUMASK
    Specify the file creation mask with octal expression for the translation frequency file for the users Kana-Kanji translation learning. The updated translation frequency file will be rebuilt, not be overwritten, so that it is used even if existent file exists. But the mask value set by umask the builtin command is prior, then actual mask value is the logical OR of this value and umask value. (UNIX)

FTPADDRESS
    Specify the mail address used as the password for anonymous FTP, when the URL drive connects the FTP host. The default value is FDclone@. (UNIX)

FTPLOGFILE
    Specify the filename to which communication logs are outputted, when the URL drive communicates with the FTP host. If it is not specified as fullpath nor you don't prepare the directory in which the log file is stored, no log will be outputted. (UNIX)

FTPPROXY
    Specify the URL used as the proxy server, when the URL drive connects the FTP host. The URL format is scheme://[user[:password]@]host[:port]. You can specify ftp or http as scheme. You can specify account information to connect the proxy server as user and password. The default value is not specified. (UNIX)

FUNCLAYOUT
    Specify the layout of the function line, as the form of n * 100 + size. N means the number of function keys to be displayed in the function line. Size means the block size of function keys to be displayed. The default value is 1005. (It means 10 function keys will be displayed, 5 of which are grouped.)

HIDEPASSWD
    Suppress displaying * as a replacement for the inputted letter, when the URL drive requires you to input a password. Any value except 0 and null effects valid. (UNIX)

HISTFILE
    Specify the name of the command history file which can be referred by EXECUTE_FILE and EXECUTE_SH. Unless you specify it, the command history is not loaded nor saved. The default value is ~/.fd_history. (On MS-DOS version, The default value is $HOME\fd.hst.)

HISTSIZE
    Specify the maximum number of the command histories which can be referred by EXECUTE_FILE and EXECUTE_SH. The default value is 50. If this value is 0, you can refer to no command history.

HISTUMASK
    Specify the file creation mask with octal expression for the command history file. It is used only if no existent file exists. But the mask value set by umask the builtin command is prior, then actual mask value is the logical OR of this value and umask value.

HOME*
    Specify the default value when no argument of cd the builtin command is specified. When invoked as a login shell, if this variable is specified that directory becomes the current directory, otherwise your home directory is automatically defined as this value.

HTMLLOGFILE
    Specify the filename to which received HTML data log are outputted, when the URL drive communicates with the HTTP host. If it is not specified as fullpath nor you don't prepare the directory in which the log file is stored, no log will be outputted. (UNIX)

HTTPLOGFILE
    Specify the filename to which communication logs are outputted, when the URL drive communicates with the HTTP host. If it is not specified as fullpath nor you don't prepare the directory in which the log file is stored, no log will be outputted. (UNIX)

HTTPPROXY
    Specify the URL used as the proxy server, when the URL drive connects the HTTP host. The URL format is scheme://[user[:password]@]host[:port]. You can specify http as scheme. You can specify account information to connect the proxy server as user and password. The default value is not specified. (UNIX)

IFS*
    Specify the internal field separators. They are used in EXECUTE_SH to separate command and arguments. Space, tab and newline are specified by default.

IGNORECASE
    Ignore uppercase/lowercase when filenames are compared. Any value except 0 and null effects valid. (UNIX)

IMEBUFFER
    Specify whether if the Kana-Kanji translation table is held on memory or not. It will be fast to translate strings from Kana to Kanji. You should set this if you have enough memory. The following are specifiable values. (UNIX)
    0	not hold on memory
    1	only the Hinsi information table
    2	also includes the index tables
    3	hold all tables

IMELEARNING
    Specify the learning level with the translation frequency file for the users Kana-Kanji translation learning. The larger value will increase the importance of the frequency information. If the value is 0, the frequency information is only saved, without any reference. The default value is 16. (UNIX)

IMEKEY
    Specify the key to toggle the direct input mode and the Kana-Kanji IME mode when you input some strings. You can describe the same key name as bind command. The default value is not specified. (UNIX)

INHERITCOPY
    Inherit the destination timestamp from the source timestamp when COPY_FILE command is executed. Any value except 0 and null effects valid. (UNIX) (On MS-DOS version, the destination timestamp is always inherited, if this variable is effective or not.)

INPUTKCODE
    Specify the Kanji code for input from keyboard. When the value except the following is specified, the Kanji code specified in compile is valid. (UNIX)
    SJIS, sjis	Shift JIS
    EUC, euc	EUC-JP
    UTF8, utf8	UTF-8
    UTF8-mac, mac	UTF-8 for Mac OS X
    UTF8-iconv	UTF-8 for iconv

LANGUAGE
    Specify the language for display character. It means not only each messages displayed by fd, but also a Kanji code of filename to be converted. The following is the kind of languages, it doesn't have to be the string itself and is enough to contain the string, the value of LANG the environment variable also can be used. JIS8, JUNET, etc. among them are the Kanji codes used in Samba.
    SJIS, sjis	Shift JIS
    EUC, euc	EUC-JP
    JIS, jis	7bit JIS
    JIS8, jis8	8bit JIS
    JUNET, junet	ISO-2022-JP
    OJIS, ojis	7bit JIS (JIS C6226-1978 + roman)
    OJIS8, ojis8	8bit JIS (JIS C6226-1978 + roman)
    OJUNET, ojunet	ISO-2022-JP (JIS C6226-1978 + roman)
    UTF8, utf8	UTF-8
    UTF8-mac, mac	UTF-8 for Mac OS X
    UTF8-iconv	UTF-8 for iconv
    en, C, POSIX	English (message only)
    default	no convert
    (On MS-DOS version, only the English is valid.)

LINENO*
    Indicate the current line number. When not in a script nor function, this value cannot be guaranteed to make sense. If you unset or reset this value, this variable will lose its special meaning to be treated as a general variable.

LINES*
    The variable for the lines of a terminal screen. If some value is set, this value will be replaced automatically according to changing the screen size. If no value is set, this value will remain unset.

LOGFILE
    Specify the log filename with the level spacified by LOGLEVEL or ROOTLOGLEVEL. If it is not specified as fullpath, it will be regarded as the path under your home directory. You must prepare the directory in which the log file is stored, because any directories are not created automatically. The default value is not specified.

LOGLEVEL
    Specify the priority for the log contents. The default value is 0.
    0	no log
    1	only warning such as writing
    2	notice such as changing, and over
    3	info. such as refering, and over
    >= 4	debug level, and over
    The same operation can result as an error to output the log in the lower priority by 1 level.

LOGSIZE
    Specify the maximum kilobyte size for the log file specified by LOGFILE. If the size exceeds this value, the last log file will be renamed as the filename followed by the extension .old to create another new log file. The default value is 1024(1MB). If this value is 0, the log file will not be renamed.

LOOPCURSOR
    Loop a cursor moving within the same page, when you move a cursor. Any value except 0 and null effects valid.

MAIL*
    Specify the spool filename when the internal shell will check new mails. If MAILPATH is set, it is prior to this. (UNIX)

MAILCHECK*
    Specify the interval of checking new mails in seconds, for the spool files specified by MAILPATH or MAIL. The default value is 600 seconds. If this value is 0, it will be checked before each prompt. (UNIX)

MAILPATH*
    Specify the multiple spool filenames, as the list separated by :, when the internal shell will check new mails. The any specified files will be checked. Each filenames can be followed by % and a arrival message of new mails. The default message is you have mail. (UNIX)

MESSAGELANG
    Specify the language for display character. The language of messages specified by this will be prior to the one specified by LANGUAGE. When the message is Japanese, the Kanji code will be defined by the value of LANGUAGE. The following is the kind of languages, it doesn't have to be the string itself and is enough to contain the string, the value of LANG the environment variable also can be used. Otherwise, In case of some additional message catalogs are prepared, you can specify its extension as the catalog name for MESSAGELANG to replace messages.
    en, C, POSIX	English
    ja	Japanese
    default	the value of LANGUAGE

MINFILENAME
    Specify the minimum character length of filename display area in the file list. When the area enough to be specified here cannot be obtained, the information is reduced in the order of UID, GID, timestamp, size. The default value is 12 characters.

OPTARG*
    An option argument is substituted in getopts the builtin command.

OPTIND*
    Specify the index of the next parameter in getopts the builtin command.

PAGER
    Specify the pager command used for viewing files.

PATH*
    Specify the search path for executing external commands. You can specify multiple paths separating with ':'.

PPID*
    Indicate the process ID of the parent proccess for fd which is invoked first. (UNIX)

PRECEDEPATH
    Specify the file preceding function, which displays only filenames before obtaining their file information, for the directory which has a lot of files like as /dev. You can specify multiple pathnames separating with ':'. You are enough to specify only the top directory where you want to realize the file preceding function, then the file preceding function is valid in all of the directories under that directory. When the file preceding function is effective, any files are not sorted in that directory, and file information is obtained file by file while waiting the key input. No pathname is specified by default.

PRECOPYMENU
    Display the menu in advance, which ask you what do you want with the same named files and the restricted files, when you copy, move, or delete multiple files. In case of too many target files, it avoids the occurrence of query after waiting for a moment. Any value except 0 and null effects valid.

PROGRESSBAR
    Display the progress bar, which indicates the progress, when you copy, move, or delete files. It needs the time to calculate the progress, to make the processing time a little longer than no progress bar. Any value except 0 and null effects valid.

PS1 Specify the prompt string of input line in EXECUTE_SH. The default value is "$ ". The following escape sequences are available.
    \u	username (UNIX)
    \h	hostname (UNIX)
    \H	hostname (including domain name) (UNIX)
    \w	fullpath of current directory
    \~	fullpath of current directory
    	(to simplify home directory with ~)
    \W	current directory name
    \!	command history number
    \$	if UID is 0, a #, otherwise a $ (UNIX)
    \[	beginning of non-printing sequence
    	(terminal control character etc.)
    \]	ending of non-printing sequence
    \e	ESC (\033)
    \ooo	character indicated by the octal ooo
    \\	\ itself

PS2 Specify the prompt string when more continuous input is needed in EXECUTE_SH. The default value is "> ".

PS4*
    Specify the prompt string with which command strings are displayed when you do set -x.

PTYINKCODE
    Specify the Kanji code for the string passed to the pseudo terminal. The string, which is converted from the Kanji code specified by INPUTKCODE to the Kanji code specified by this command, is inputted to any processes running on the pseudo terminal. This variable has the individual value for each pseudo terminal, so that you should change value of the variable on the pseudo terminal to change the input Kanji code of the pseudo terminal running already. (UNIX)
    SJIS, sjis	Shift JIS
    EUC, euc	EUC-JP
    UTF8, utf8	UTF-8
    UTF8-mac, mac	UTF-8 for Mac OS X
    UTF8-iconv	UTF-8 for iconv
    default	no convert

PTYMENUKEY
    Specify the key to open the pseudo terminal menu while you are handling the pseudo terminal. You can describe the same key name as bind command. You can select the following items in the pseudo terminal menu: "SendAsIs", "InputCode", "Break", "NextWindow" and "Kanji". Each item means respectively: sending the pseudo terminal menu key as is, inputting the key name to be sent, terminating forcedly the process running in the pseudo terminal, changing to the next window, invoking the Kana-Kanji IME. In "InputCode", you can use the key name like as bind command, and also the Kanji code number used in the Kana-Kanji IME mode. But you cannot select "NextWindow" in the non-split window mode. The default value is not specified. (UNIX)

PTYMODE
    Use the pseudo terminal to invoke external commands. In the split window mode, the independent pseudo terminals for every windows will be opened and enable you to handle simultaneously multiple external commands via terminals. If the terminal in use can not provide some functions required for the terminal emulation, the pseudo terminal may not work correctly. Any value except 0 and null effects valid. (UNIX)

PTYOUTKCODE
    Specify the Kanji code for the string passed from the pseudo terminal. The string, which is converted from the Kanji code specified by this command to the Kanji code specified by LANGUAGE, is displayed from any processes running on the pseudo terminal. This variable has the individual value for each pseudo terminal, so that you should change value of the variable on the pseudo terminal to change the output Kanji code of the pseudo terminal running already. (UNIX)
    SJIS, sjis	Shift JIS
    EUC, euc	EUC-JP
    UTF8, utf8	UTF-8
    UTF8-mac, mac	UTF-8 for Mac OS X
    UTF8-iconv	UTF-8 for iconv
    default	no convert

PTYTERM
    Specify the value of TERM the environment variable to be passed to external commands, when you use the pseudo terminal. Some termcap(5) or terminfo(5) may cause unexpected behavior of the pseudo terminal, you should specify the effective terminal name in your environment. The default value is vt100. (UNIX)

PWD*
    The variable for the current directory with the absolute representation. If some value is set, this value will be replaced automatically according to changing the current directory. If no value is set, this value will remain unset. If this is passed as an environment variable when invoked, and this value and the current directory indicate the same directory logically, then it is used as the default value for the current directory. It is useful when you want to specify the logical pathname following symbolic links.

ROOTLOGLEVEL
    Specify the priority for the log contents of the super user. The default value is 1. (UNIX)
    0	no log
    1	only warning such as writing
    2	notice such as changing, and over
    3	info. such as refering, and over
    >= 4	debug level, and over
    The same operation can result as an error to output the log in the lower priority by 1 level.

RRPATH
    Display files under the directory mounted by CD-ROM, with the pseudo ISO 9660 RockRidge Extension, for the OS which cannot support RockRidge Extension. You can specify multiple mount points separating with ':'. You are enough to specify only the top directory mounted by CD-ROM, then the pseudo RockRidge Extension function is valid in all of the directories under that directory. This is no more than a pseudo extension, which only replaces filenames according to TRANS.TBL, and cannot handle some CD-ROM which has an inconsistent TRANS.TBL. No mount point is specified by default.

SAVEDIRHIST
    Specify the maximum number saved to the directory history file. The default value is 50. If this value is 0, no directory history file is saved.

SAVEHIST
    Specify the maximum number saved to the command history file. The default value is 50. If this value is 0, no command history file is saved.

SECOND
    Display the second in the clock of the title line. But the clock is adjusted correctly every 10 seconds, and some gap from the real time will be occurred in this span. Any value except 0 and null effects valid.

SHELL
    When the filename part of this specified value is rfd or rfdsh, the shell becomes a restricted shell as well as -r option when invoked. This variable also specify the shell which can be invoked from EXECUTE_SH.

SIZEINFO
    Display the file size information line at the top of screen. The total size displayed here is not the sum of bytes but the sum of disk block size occupied actually. Any value except 0 and null effects valid.

SIZEUNIT
    Represent the huge file size which overflows the displayed digit with the prefix of the SI unit, as "KB", "MB" and so on. Any value except 0 and null effects valid.

SORTTREE
    Sort directories in the tree screen. The sorted type specified by SORT_DIR is used, but they can not be sorted when it is "by size" or "by timestamp". The directory included in the current directory path is always placed on the top of directory tree, with no regard to the sorted type. Any value except 0 and null effects valid.

SORTTYPE
    The file list in the browser screen is not sorted by default, but placed in order registered in the directory. This variable specify it to be sorted by default. The following are specifiable values.
    0	not sort
    1	by filename	9	by filename(reverse)
    2	by extension	10	by extension(reverse)
    3	by size	11	by size(reverse)
    4	by timestamp	12	by timestamp(reverse)
    5	by length	13	by length(reverse)
    100-113	keep the last sorted type
    200-213	keep it also in archive browser
    If you specify the value of 100-113, it is sorted according to the value indicated by lower 2 digits just after invoked, the last specified sorted type is kept when moving directory. If you specify the value of 200-213, the last sort type will be kept also after invoking the archive browser.

TERM*
    Specity the terminal name. When this value is dumb, unknown or un, it is regarded as the dumb terminal to suppress any escape sequences in the internal shell in spite of DUMBSHELL. If this value does not exist in termcap(5) and terminfo(5) entry, it is executable only when it is invoked as fdsh. The terminal name will be variable dynamically, then you can re-specify the suitable one as this value after invoked for some strange terminal display and key input.

THRUARGS
    Pass through the pathnames as is, which is specified as the startup arguments. Fd expands the meta character such as ~ and ${#} in the given pathname by itself, because the obsolete low-level shell cannot support these expansion extended by POSIX. Fd can sometimes expand the pathname given by the shell into the unexpected string as a result of duplicate expansion, because the latest high-level shell generally support these expansion. This variable will be suppress the expansion of arguments. Any value except 0 and null effects valid.

TMPDIR
    Specify the working directory where the archiver command temporarily unpack files in the archive file. The default value is /tmp. (On MS-DOS version, The default value is `.'.)

TMPUMASK
    Specify the file creation mask with octal expression for files and directories created temporarily in TMPDIR. But the mask value set by umask the builtin command is prior, then actual mask value is the logical OR of this value and umask value.

TRADLAYOUT
    Use the traditional screen layout based on the original "FD". In this layout, the file size information will be always displayed, whether SIZEINFO is set or not. When the screen width is less than 80 columns, this specification is invalid. Any value except 0 and null effects valid.

UNICODEBUFFER
    Hold the UNICODE translation table on memory. It will be fast to access the floppy drive and to translate from/to UTF-8. You should set this if you have enough memory. Any value except 0 and null effects valid.

URLDRIVE
    Validate the function of the URL drive. Any value except 0 and null effects valid. (UNIX)

URLKCODE
    Specify the Kanji code for filename on the host with the URL drive. JIS8, JUNET, HEX, CAP, etc. among them are the Kanji codes used in Samba. (UNIX)
    SJIS, sjis	Shift JIS
    EUC, euc	EUC-JP
    JIS, jis	7bit JIS
    JIS8, jis8	8bit JIS
    JUNET, junet	ISO-2022-JP
    OJIS, ojis	7bit JIS (JIS C6226-1978 + roman)
    OJIS8, ojis8	8bit JIS (JIS C6226-1978 + roman)
    OJUNET, ojunet	ISO-2022-JP (JIS C6226-1978 + roman)
    HEX, hex	HEX
    CAP, cap	CAP
    UTF8, utf8	UTF-8
    UTF8-mac, mac	UTF-8 for Mac OS X
    UTF8-iconv	UTF-8 for iconv
    default	no convert

URLOPTIONS
    Specify communication options, when the URL drive communicates with the host. You can select individually whether if PASV, PORT, MDTM, FEAT each commands for the FTP communication are limited or not, or whether if the exact file information is need or not. On the HTTP protocol, you will get the timestamp and size of files with some rounding error in bulk. If you need the exact information, the operations by file will spend the more communication time. The default value is 0. The following are specifiable values. (UNIX)
    0	standard
    1	PASV
    2		PORT
    3	PASV &	PORT
    4			MDTM
    5	PASV &		MDTM
    6		PORT &	MDTM
    7	PASV &	PORT &	MDTM
    8				FEAT
    9	PASV &			FEAT
    10		PORT &		FEAT
    11	PASV &	PORT &		FEAT
    12			MDTM &	FEAT
    13	PASV &		MDTM &	FEAT
    14		PORT &	MDTM &	FEAT
    15	PASV &	PORT &	MDTM &	FEAT
    16					HTTP
    17	PASV &				HTTP
    18		PORT &			HTTP
    19	PASV &	PORT &			HTTP
    20			MDTM &		HTTP
    21	PASV &		MDTM &		HTTP
    22		PORT &	MDTM &		HTTP
    23	PASV &	PORT &	MDTM &		HTTP
    24				FEAT &	HTTP
    25	PASV &			FEAT &	HTTP
    26		PORT &		FEAT &	HTTP
    27	PASV &	PORT &		FEAT &	HTTP
    28			MDTM &	FEAT &	HTTP
    29	PASV &		MDTM &	FEAT &	HTTP
    30		PORT &	MDTM &	FEAT &	HTTP
    31	PASV &	PORT &	MDTM &	FEAT &	HTTP

URLTIMEOUT
    Specify the timeout in seconds, when the URL drive communicates with the host. If the communication from the host is lost for the time specified, the communication is regarded as invalid and its connection will be shutdown forcedly. If this value is 0 second, the timeout operation is invalid to continue waiting response forever. The default value is 0 second. (UNIX)

USEGETCURSOR
    Use the VT100 compatible escape sequence getting the cursor position in order to get the terminal size. When the screen size of fd doesn't correspond with the terminal size, this variable can be sometimes valid. On some terminals which don't support the escape sequence getting the cursor position, the operation may be stopped. In this case, it is continued by inputting 'R' from the keyboard. Any value except 0 and null effects valid. (UNIX)

USESYSLOG
    Send the log to syslogd(8) the system logger with the level spacified by LOGLEVEL or ROOTLOGLEVEL. The log priority is LOG_ERR only some errors are caused, otherwise the log priority is always LOG_INFO. LOG_USER is used as the facirity if it can be specified. Any value except 0 and null effects valid. (UNIX)

WIDEDIGIT
    Widen the displayed digits for the number of pages and files. The standard displayed digits for the number of pages and files are 2 and 4 respectively. This expands them into 4 and 5 respectively. Any value except 0 and null effects valid.

WRITEFS
    Forbid use of WRITE_DIR command. If the value is 1, the directory is written only when the command is executed intentionally, and you are not confirmed after arranging the file order. If the value is 2, even writing by the command is invalid, the directory writing is quite forbidden.

SJISPATH
EUCPATH
JISPATH
JIS8PATH
JUNETPATH
OJISPATH
OJIS8PATH
OJUNETPATH
HEXPATH
CAPPATH
UTF8PATH
UTF8MACPATH
UTF8ICONVPATH
NOCONVPATH
    Specify the Kanji code for filename per directory, which is prior to FNAMEKCODE. You can specify multiple pathnames separating with ':'. You are enough to specify only the top directory where you want to use the Kanji code, then you can use the Kanji code in all of the directories under that directory. In the directory which is described in NOCONVPATH, no Kanji code is converted ignoring the value of FNAMEKCODE. No pathname is specified by default. (UNIX)

MULTI LANGUAGE SUPPORT
Fd processes the Kanji character-set to input/output as "EUC-JP" or "Shift JIS" according to setting in compile. The the pathname including Kanji is displayed in consideration for the 2nd byte character in Kanji. You can dynamically select Kanji code to input/output with LANGUAGE, INPUTKCODE and FNAMEKCODE the internal variable. You can input Japanese string with the Kana-Kanji IME mode. You can use Kanji in the command macro and the command string, but cannot use Kanji as the value of the internal variables. You cannot use the multibyte symbol character as the meta character, such as '%' and '"' and so on, Kanji character is not counted as 1 character in the wildcard search. And when you give the non-standard Kanji code for the OS to the shell with the parameter macro such as %JJ, some Kanji is converted into the code including the meta character such as '$' and '\' and so on, to cause unexpected behavior. In that case, you can probably avoid it by quoting the string to be converted with %'.

AUTHOR
Takashi SHIRAI <shirai@unixusers.net>
The original "FD" for MS-DOS was created and released by A.Idei <SDI00544@niftyserve.or.jp> for the first time, in 1989. Fd was created for UNIX from scratch following that implementation, in 1995.

FILES
/etc/fd2rc
    The systemwide initial configuration file for fd
~/.fd2rc
    The individual initial configuration file for fd
~/.fdshrc
    The individual initial configuration file for fdsh
~/.fd_history
    The command history file by default
~/.fd_freq
    The translation frequency file by default for the users Kana-Kanji translation learning
/bin/sh
    The user shell when SHELL the environment variable is undefined
/bin/rm
    The command to remove temporary files when abort
/tmp/fd*
    The temporary directory to unpack the archive file
fd-unicd.tbl
    The UNICODE translation table, which is installed in the same directory as the executable binary of fd
fd-dict.tbl
    The Kana-Kanji translation dictionary file, which is installed in the same directory as the executable binary of fd
fd2rc
    The systemwide initial configuration file for fd on MS-DOS version, which must be prepared in the same directory as the executable binary of fd
$HOME\fd2.rc
    The individual initial configuration file for fd on MS-DOS version
$HOME\fdsh.rc
    The individual initial configuration file for fdsh on MS-DOS version
$HOME\fd.hst
    The command history file on MS-DOS version by default

LIMITATIONS
Some terminals cannot send the input of certain function keys and special keys. The sequence compatible with VT200 is assigned as the default sequence which is not registered in termcap(5), and when the terminal cannot support this, the key receipt or the screen control due to be brought by this is not available.

SEE ALSO
sh(1), echo(1), test(1), ls(1), rm(1), tar(1), compress(1), zcat(1), gzip(1), gunzip(1), lha(1), login(1), newgrp(1), stty(1), umask(2), termcap(5), terminfo(5), syslogd(8)

BUGS
When files in an archive file are packed with a pathname including "..", the archive browser cannot work normally. The symbolic links in an archive file cannot be unpacked individually. The user interface is cheap.

COPYRIGHT
Copyright (C) 1995-2019 by Takashi SHIRAI