complete man page on Inferno

Man page or keyword search:  
man Server   579 pages
apropos Keyword Search (all sections)
Output format
Inferno logo
[printable version]

COMPLETE(2)							   COMPLETE(2)

NAME
       complete - file name completion

SYNOPSIS
       include "complete.m";
       complete := load Complete Complete->PATH;

       Completion: adt {
	   advance:  int;    # whether forward progress has been made
	   complete: int;    # whether the completion now represents a file or directory
	   str:	     string; # string to advance, suffixed " " (file) or "/" (directory)
	   nmatch:   int;    # number of files that matched
	   filename: array of string;	 # their names
       };

       init:	 fn();
       complete: fn(dir, s: string): (ref Completion, string);

DESCRIPTION
       Complete implements file name completion.

       Init must be called before any other operation of the module.

       Given  a	 directory  dir	 and  a	 string	 s,  complete  returns a tuple
       (c, err), where c is an analysis of the file names  in  that  directory
       that begin with the string s.  The field nmatch will be set to the num‐
       ber of files that match the prefix and filename will be filled in  with
       their  names.  If the file named is a directory, a slash character will
       be appended to it.  On an error, c is  nil  and	err  is	 a  diagnostic
       string.

       If  no  files  match the string, nmatch will be zero, but complete will
       return the full set of files in the directory.

       The flag advance reports whether the string s can be  extended  without
       changing	 the set of files that match.  If true, str will be set to the
       extension; that is, the value of str may be appended to s by the caller
       to extend the embryonic file name unambiguously.

       The flag complete reports whether the extended file name uniquely iden‐
       tifies a file.  If true, str will be suffixed with a blank, or a	 slash
       and  a blank, depending on whether the resulting file name identifies a
       plain file or a directory.

SOURCE
       /appl/lib/complete.b

SEE ALSO
       names(2)

DIAGNOSTICS
       The complete function returns a nil reference and a  diagnostic	string
       if the directory is unreadable or there is some other error.

								   COMPLETE(2)
[top]

List of man pages available for Inferno

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net