NAME

bintypes - finds type-specific entries in an index file

SYNOPSIS

  bintypes [options] <search tags>

DESCRIPTION

bintypes finds type-specific entries in an index file. The entries that match user-specified tag will be displayed. The information displayed depends on the options given. These are detailed below.

The index file is expected to be in a very specific format, The entries give a command name, a brief description, and index tags. The file is expected to be in ~/bin/README.

The following lines show the format of the file:

    ascstr      print ASCII-only lines in a file   ;;lang-c
    cfin        find file in PATH                  ;;lang-python
    clbc        command-line front-end to bc       ;;lang-perl
    cronfetch   fetches mail from a server         ;;lang-csh
    lsdb        list some NetPolicy db fields      ;;lang-csh, obs
    oldsrc      directory for old source files     ;;dir
    playsound   plays a soundfile                  ;;OSX,lang-objc

The first column is the name of the entry. The two semicolons mark the start of the comma-separated tags list Everything between those is the description for the entry. The tags are described below.

Output Format

The output from bintypes depends on the options that are given on the command line. Examples will best show the differences. These examples use this as a matching entry:

    cfin	find file in PATH			;;lang-python
Without any options, bintypes gives this output:

    cfin

With the -type option, bintypes gives this output:

    cfin        lang-python

With the -verbose option, bintypes gives this output:

    cfin        find file in PATH

With the -full option, bintypes gives this output:

    cfin	find file in PATH			;;lang-python

With the "-bin" option, bintypes gives this output:

    /Users/bob/bin/cfin

With the "-path /usr/bin" option, bintypes gives this output:

    /usr/bin/cfin

With the "-path -" option, bintypes gives this output:

    /Users/bob/bin/cfin

This assumes ~/bin translates to /Users/bob/bin.

With the "-path /foo///" option, bintypes gives this output:

    /foo/cfin

With the -count option, bintypes will provide the count of entries that match the search tag. However, the matching entries will not be given.

The -list option will display all the valid search tags.

Search Tag

Valid search tags fall into two categories: language tags and other tags. Language tags can be specified in a long format or a short format. Other tags only have a single format.

The following are the valid language tags. The meanings should be obvious.

    long format       short format
    -----------       ------------
    lang-c            c
    lang-csh          csh
    lang-objc         objc
    lang-perl         perl
    lang-php          php
    lang-python       python
    lang-ruby         ruby
    lang-sh           sh
    lang-tcl/tk       tcl/tk
    lang-termcap      termcap

The following are the valid other tags. The meanings are provided.

    tag               meaning
    ---               -------
    freebsd           written for FreeBSD
    osx               written for Mac OS X
    dir               directory
    notmine           written by someone else
    obs               obsolete

OPTIONS

bintypes takes the following options:

LICENSE

Copyright 2015 Wayne Morrison

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

AUTHOR

Wayne Morrison, wayne@waynemorrison.com