table of contents
other sections
FD(1) | General Commands Manual | FD(1) |
NAME¶
fd - file & directory maintenance toolSYNOPSIS¶
fd [ -abCefhiklmNnPrSsTtuvx ] [ -NAME=value ] [ directory [ directory2 ... ]]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.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.- -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.
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.- 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 nothingThe 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
[∗].
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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)
- 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.
- 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.
- 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.
- 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.
- 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.
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.
- 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.
- !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)
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- del [-P] file
- erase [-P] file
- Delete the files indicated by file. You can specify
multiple files by using wildcard.
- 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.
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)
- 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.
- 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.
- 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.
- 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)
- 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.
- 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.
- history [n]
- List the last n command histories with the history
number.
- 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.
- 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.
- 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.
- printbind [c]
- Print the command binded to the key c. You can
specify the key as well as bind.
- printdrv [c]
- Print the device file and the number of
heads/sectors/cylinders of the floppy drive registered for the drive name
c. (UNIX)
- 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.
- 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)
- 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.
- 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.
- 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.
- 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)
- 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)
- 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)
- 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)
- -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)
- 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, the current job is 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.
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.- 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.
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
%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
- `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"
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.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.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.
- ~
- 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.
- 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 \.
- `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 [ ].
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.- 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.
- S
- Shift JIS
- E
- EUC-JP
- J
- JIS code (JIS X0208)
- K
- Kuten code
- U
- UNICODE (UCS2)
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 exceeds 1023 characters, 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)
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.
- 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].- 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.
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.
- 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.
- 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
- 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.
- 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.
- 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)
- 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)
- IMEBUFFER
- Hold the Kana-Kanji translation table on memory. It will be fast to translate strings from Kana to Kanji. You should set this if you have enough memory. The table held on memory is only the Hinsi information table, then you will have no effect when you use the dictionary file with no Hinsi information. Any value except 0 and null effects valid. (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)
- 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 file name 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 are 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 are 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.
- 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.
- 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 are 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)
- 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.AUTHOR¶
Takashi SHIRAI <shirai@unixusers.net>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 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.COPYRIGHT¶
Copyright (C) 1995-2012 by Takashi SHIRAIApril 21, 2012 |