wayneeseguin/rvm — Issue #727: errors with tput and tar on OpenBSD...
Author: rwboyer
Created: 2012-01-27 18:46:05+00:00
State: open

using gnu bash 4.2

uname OpenBSD openbsd.ipcloud.ws 5.1 GENERIC#161 amd64

tput man page...

TPUT(1) OpenBSD Reference Manual TPUT(1)

NAME
tput - terminal capability interface

SYNOPSIS
tput [-T term] attribute [attribute-args] ...
tput [-T term] -S

DESCRIPTION
The tput utility makes terminal-dependent information available to users
or shell applications.

The options are as follows:

-S The attributes are read from stdin instead of the command line.

-T The terminal name as found in the terminfo database; for example,
``vt100'' or ``xterm''. If not specified, tput retrieves the
TERM variable from the environment.

tput outputs a string if the attribute is of type string or a number if
it is of type integer. If the attribute is of type boolean, tput exits 0
if the terminal has the capability or 1 if it does not. Each attribute
should be a string defined in either terminfo(5) or termcap(5).

If the attribute is of type string and takes arguments (e.g., cursor
movement, the terminfo ``cup'' sequence) the arguments are taken from the
command line immediately following the attribute.

The following special attributes are available:

clear Clear the screen (the terminfo ``clear'' sequence).

init Print the terminfo initialization strings for the specified
terminal.

longname Print the descriptive name of the user's terminal type.

reset Reset the terminal (using the terminfo reset sequences).

EXIT STATUS
The exit value of tput is based on the last attribute specified. If the
attribute is of type string or of type integer the exit value is as
follows:

0 The requested string was written successfully.
2 Usage error.
3 Unknown terminal type.
4 Unknown attribute name.
>4 An error occurred.

If the attribute is of type boolean, tput exits with a value of 0 if the
terminal has this attribute or 1 if it does not.

EXAMPLES
tput clear cup 5 10 clear the screen and goto line 5 column 10

tput cup 6 11 dch 6 goto line 6 column 11 and delete 6 characters

SEE ALSO
terminfo(3), terminfo(5)

STANDARDS
The tput utility is compliant with the IEEE Std 1003.1-2008 (``POSIX.1'')
specification.

The flag [-S] is an extension to that specification.

HISTORY
A clear utility implementing the functionality of tput clear first
appeared in 2BSD. The tput utility appeared in 4.4BSD.

BUGS
tput can't really distinguish between different types of attributes.

OpenBSD 5.1 January 15, 2012 OpenBSD 5.1

tar man page...

TAR(1) OpenBSD Reference Manual TAR(1)

NAME
tar - tape archiver

SYNOPSIS
tar {crtux}[014578befHhjLmNOoPpqsvwXZz]
[blocking-factor | archive | replstr] [-C directory] [-I file]
[file ...]
tar {-crtux} [-014578eHhjLmNOoPpqvwXZz] [-b blocking-factor]
[-C directory] [-f archive] [-I file] [-s replstr] [file ...]

DESCRIPTION
The tar command creates, adds files to, or extracts files from an archive
file in ``tar'' format. A tar archive is often stored on a magnetic
tape, but can be stored equally well on a floppy, CD-ROM, or in a regular
disk file.

In the first (legacy) form, all option flags except for -C and -I must be
contained within the first argument to tar and must not be prefixed by a
hyphen (`-'). Option arguments, if any, are processed as subsequent
arguments to tar and are processed in the order in which their
corresponding option flags have been presented on the command line.

In the second and preferred form, option flags may be given in any order
and are immediately followed by their corresponding option argument
values.

One of the following flags must be present:

-c Create new archive, or overwrite an existing archive, adding the
specified files to it.

-r Append the named new files to existing archive. Note that this
will only work on media on which an end-of-file mark can be
overwritten.

-t List contents of archive. If any files are named on the command
line, only those files will be listed. The file arguments may be
specified as glob patterns (see glob(3) for more information), in
which case tar will list all archive members that match each
pattern.

-u Alias for -r.

-x Extract files from archive. If any files are named on the
command line, only those files will be extracted from the
archive. The file arguments may be specified as glob patterns
(see glob(3) for more information), in which case tar will
extract all archive members that match each pattern.

If more than one copy of a file exists in the archive, later
copies will overwrite earlier copies during extraction. The file
mode and modification time are preserved if possible. The file
mode is subject to modification by the umask(2).

In addition to the flags mentioned above, any of the following flags may
be used:

-b blocking-factor
Set blocking factor to use for the archive. tar uses 512-byte
blocks. The default is 20, the maximum is 126. Archives with a
blocking factor larger than 63 violate the POSIX standard and
will not be portable to all systems.

-C directory
This is a positional argument which sets the working directory
for the following files. When extracting, files will be
extracted into the specified directory; when creating, the
specified files will be matched from the directory.

-e Stop after the first error.

-f archive
Filename where the archive is stored. Defaults to /dev/rst0.

-H Follow symlinks given on the command line only.

-h Follow symbolic links as if they were normal files or
directories. In extract mode this means that a directory entry
in the archive will not overwrite an existing symbolic link, but
rather what the link ultimately points to.

-I file
This is a positional argument which reads the names of files to
archive or extract from the given file, one per line.

-j Compress archive using bzip2. The bzip2 utility must be
installed separately.

-L Synonym for the -h option.

-m Do not preserve modification time.

-N Use only the numeric UID and GID values when creating or
extracting an archive.

-O Write old-style (non-POSIX) archives.

-o Don't write directory information that the older (V7) style tar
is unable to decode. This implies the -O flag.

-P Do not strip leading slashes (`/') from pathnames. The default
is to strip leading slashes.

-p Preserve user and group ID as well as file mode regardless of the
current umask(2). The setuid and setgid bits are only preserved
if the user is the superuser. Only meaningful in conjunction
with the -x flag.

-q Select the first archive member that matches each file operand.
No more than one archive member is matched for each file. When
members of type directory are matched, the file hierarchy rooted
at that directory is also matched.

-s replstr
Modify the archive member names according to the substitution
expression replstr, using the syntax of the ed(1) utility regular
expressions. file arguments may be given to restrict the list of
archive members to those specified.

The format of these regular expressions is

/old/new/[gp]

As in ed(1), old is a basic regular expression (see re_format(7))
and new can contain an ampersand (`&'), `\n' (where n is a digit)
back-references, or subexpression matching. The old string may
also contain newline characters. Any non-null character can be
used as a delimiter (`/' is shown here). Multiple -s expressions
can be specified. The expressions are applied in the order they
are specified on the command line, terminating with the first
successful substitution.

The optional trailing g continues to apply the substitution
expression to the pathname substring, which starts with the first
character following the end of the last successful substitution.
The first unsuccessful substitution stops the operation of the g
option. The optional trailing p will cause the final result of a
successful substitution to be written to standard error in the
following format:

original-pathname >> new-pathname

File or archive member names that substitute to the empty string
are not selected and will be skipped.

-v Verbose operation mode.

-w Interactively rename files. This option causes tar to prompt the
user for the filename to use when storing or extracting files in
an archive.

-X Do not cross mount points in the file system.

-Z Compress archive using compress(1).

-z Compress archive using gzip(1).

The options [-014578] can be used to select one of the compiled-in backup
devices, /dev/rstN.

ENVIRONMENT
TMPDIR Path in which to store temporary files.

TAPE Default tape device to use instead of /dev/rst0.

FILES
/dev/rst0 default archive name

EXIT STATUS
The tar utility exits with one of the following values:

0 All files were processed successfully.
1 An error occurred.

EXAMPLES
Create an archive on the default tape drive, containing the files named
bonvole and sekve:

$ tar c bonvole sekve

Output a gzip(1) compressed archive containing the files bonvole and
sekve to a file called foriru.tar.gz:

$ tar zcf foriru.tar.gz bonvole sekve

Verbosely create an archive, called backup.tar.gz, of all files matching
the shell glob(3) function *.c:

$ tar zcvf backup.tar.gz *.c

Verbosely list, but do not extract, all files ending in .jpeg from a
compressed archive named backup.tar.gz. Note that the glob pattern has
been quoted to avoid expansion by the shell:

$ tar tvzf backup.tar.gz '*.jpeg'

For more detailed examples, see pax(1).

DIAGNOSTICS
Whenever tar cannot create a file or a link when extracting an archive or
cannot find a file while writing an archive, or cannot preserve the user
ID, group ID, file mode, or access and modification times when the -p
option is specified, a diagnostic message is written to standard error
and a non-zero exit value will be returned, but processing will continue.
In the case where tar cannot create a link to a file, tar will not create
a second copy of the file.

If the extraction of a file from an archive is prematurely terminated by
a signal or error, tar may have only partially extracted the file the
user wanted. Additionally, the file modes of extracted files and
directories may have incorrect file bits, and the modification and access
times may be wrong.

If the creation of an archive is prematurely terminated by a signal or
error, tar may have only partially created the archive, which may violate
the specific archive format specification.

SEE ALSO
cpio(1), pax(1)

HISTORY
A tar command first appeared in Version 7 AT&T UNIX.

AUTHORS
Keith Muller at the University of California, San Diego.

CAVEATS
The -j and -L flags are not portable to other versions of tar where they
may have a different meaning.

OpenBSD 5.1 December 2, 2010 OpenBSD 5.1

here is what happens on every single command of rvm like rvm list...

bash-4.2$ rvm list
rvm list
tput: not enough arguments (3) for capability `setaf'
tput: not enough arguments (3) for capability `setaf'
tput: not enough arguments (3) for capability `setaf'
tput: not enough arguments (3) for capability `setaf'
tar: unknown option -- -
usage: tar {crtux}[014578befHhjLmNOoPpqsvwXZz]
[blocking-factor | archive | replstr] [-C directory] [-I file]
[file ...]
tar {-crtux} [-014578eHhjLmNOoPpqvwXZz] [-b blocking-factor]
[-C directory] [-f archive] [-I file] [-s replstr] [file ...]
tput: not enough arguments (3) for capability `setaf'
tput: not enough arguments (3) for capability `setaf'
tput: not enough arguments (3) for capability `setaf'
tput: not enough arguments (3) for capability `setaf'
tar: unknown option -- -
usage: tar {crtux}[014578befHhjLmNOoPpqsvwXZz]
[blocking-factor | archive | replstr] [-C directory] [-I file]
[file ...]
tar {-crtux} [-014578eHhjLmNOoPpqvwXZz] [-b blocking-factor]
[-C directory] [-f archive] [-I file] [-s replstr] [file ...]
tput: not enough arguments (3) for capability `setaf'
tput: not enough arguments (3) for capability `setaf'
tput: not enough arguments (3) for capability `setaf'
tput: not enough arguments (3) for capability `setaf'
tar: unknown option -- -
usage: tar {crtux}[014578befHhjLmNOoPpqsvwXZz]
[blocking-factor | archive | replstr] [-C directory] [-I file]
[file ...]
tar {-crtux} [-014578eHhjLmNOoPpqvwXZz] [-b blocking-factor]
[-C directory] [-f archive] [-I file] [-s replstr] [file ...]

rvm rubies

ruby-1.9.3-p0 [ x86_64 ]

# Default ruby not set. Try 'rvm alias create default '.

# => - current
# =* - current && default
# * - default

Also seems to have issues installing rubies due to the tar issue?