The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

osnames - List possible $^O ($OSNAME) values, with description

VERSION

This document describes version 0.07 of osnames (from Perl distribution App-osnames), released on 2014-12-18.

SYNOPSIS

Usage:

 % osnames [options] [q]

Examples:

String search:

 % osnames ux

List Unices:

 % osnames --tags-has unix --detail

List non-Unices:

 % osnames --tags-lacks unix --detail

DESCRIPTION

This list might be useful when coding, e.g. when you want to exclude or include certain OS (families) in your application/test.

OPTIONS

* marks required options.

Field-selection options

--detail

Return array of full records instead of just ID fields.

By default, only the key (ID) field is returned per result entry.

--fields-json=s

Select fields to return (JSON-encoded).

See --fields.

--fields-yaml=s

Select fields to return (YAML-encoded).

See --fields.

--fields=s@

Select fields to return.

Default value:

 undef

Can be specified multiple times.

--with-field-names

Return field names in each record (as hash/associative array).

When enabled, function will return each record as hash/associative array (field name => value pairs). Otherwise, function will return each record as list/array (field value, field value, ...).

Filtering options

-q=s

Search.

Default value:

 undef

Filtering-for-description options

--description-contains=s

Only return records where the 'description' field contains specified text.

Default value:

 undef
--description-in-json=s

Only return records where the 'description' field is in the specified values (JSON-encoded).

See --description-in.

--description-in-yaml=s

Only return records where the 'description' field is in the specified values (YAML-encoded).

See --description-in.

--description-in=s@

Only return records where the 'description' field is in the specified values.

Default value:

 undef

Can be specified multiple times.

--description-is=s

Only return records where the 'description' field equals specified value.

Default value:

 undef
--description-isnt=s

Only return records where the 'description' field does not equal specified value.

Default value:

 undef
--description-max=s

Only return records where the 'description' field is less than or equal to specified value.

Default value:

 undef
--description-min=s

Only return records where the 'description' field is greater than or equal to specified value.

Default value:

 undef
--description-not-contains=s

Only return records where the 'description' field does not contain specified text.

Default value:

 undef
--description-not-in-json=s

Only return records where the 'description' field is not in the specified values (JSON-encoded).

See --description-not-in.

--description-not-in-yaml=s

Only return records where the 'description' field is not in the specified values (YAML-encoded).

See --description-not-in.

--description-not-in=s@

Only return records where the 'description' field is not in the specified values.

Default value:

 undef

Can be specified multiple times.

--description-xmax=s

Only return records where the 'description' field is less than specified value.

Default value:

 undef
--description-xmin=s

Only return records where the 'description' field is greater than specified value.

Default value:

 undef
--description=s

Only return records where the 'description' field equals specified value.

Default value:

 undef

Filtering-for-tags options

--tags-has-json=s

Only return records where the 'tags' field is an array/list which contains specified value (JSON-encoded).

See --tags-has.

--tags-has-yaml=s

Only return records where the 'tags' field is an array/list which contains specified value (YAML-encoded).

See --tags-has.

--tags-has=s@

Only return records where the 'tags' field is an array/list which contains specified value.

Default value:

 undef

Can be specified multiple times.

--tags-is-json=s

Only return records where the 'tags' field equals specified value (JSON-encoded).

See --tags-is.

--tags-is-yaml=s

Only return records where the 'tags' field equals specified value (YAML-encoded).

See --tags-is.

--tags-is=s

Only return records where the 'tags' field equals specified value.

Default value:

 undef
--tags-isnt-json=s

Only return records where the 'tags' field does not equal specified value (JSON-encoded).

See --tags-isnt.

--tags-isnt-yaml=s

Only return records where the 'tags' field does not equal specified value (YAML-encoded).

See --tags-isnt.

--tags-isnt=s

Only return records where the 'tags' field does not equal specified value.

Default value:

 undef
--tags-json=s

Only return records where the 'tags' field equals specified value (JSON-encoded).

See --tags.

--tags-lacks-json=s

Only return records where the 'tags' field is an array/list which does not contain specified value (JSON-encoded).

See --tags-lacks.

--tags-lacks-yaml=s

Only return records where the 'tags' field is an array/list which does not contain specified value (YAML-encoded).

See --tags-lacks.

--tags-lacks=s@

Only return records where the 'tags' field is an array/list which does not contain specified value.

Default value:

 undef

Can be specified multiple times.

--tags-yaml=s

Only return records where the 'tags' field equals specified value (YAML-encoded).

See --tags.

--tags=s

Only return records where the 'tags' field equals specified value.

Default value:

 undef

Filtering-for-value options

--value-contains=s

Only return records where the 'value' field contains specified text.

Default value:

 undef
--value-in-json=s

Only return records where the 'value' field is in the specified values (JSON-encoded).

See --value-in.

--value-in-yaml=s

Only return records where the 'value' field is in the specified values (YAML-encoded).

See --value-in.

--value-in=s@

Only return records where the 'value' field is in the specified values.

Default value:

 undef

Can be specified multiple times.

--value-is=s

Only return records where the 'value' field equals specified value.

Default value:

 undef
--value-isnt=s

Only return records where the 'value' field does not equal specified value.

Default value:

 undef
--value-max=s

Only return records where the 'value' field is less than or equal to specified value.

Default value:

 undef
--value-min=s

Only return records where the 'value' field is greater than or equal to specified value.

Default value:

 undef
--value-not-contains=s

Only return records where the 'value' field does not contain specified text.

Default value:

 undef
--value-not-in-json=s

Only return records where the 'value' field is not in the specified values (JSON-encoded).

See --value-not-in.

--value-not-in-yaml=s

Only return records where the 'value' field is not in the specified values (YAML-encoded).

See --value-not-in.

--value-not-in=s@

Only return records where the 'value' field is not in the specified values.

Default value:

 undef

Can be specified multiple times.

--value-xmax=s

Only return records where the 'value' field is less than specified value.

Default value:

 undef
--value-xmin=s

Only return records where the 'value' field is greater than specified value.

Default value:

 undef
--value=s

Only return records where the 'value' field equals specified value.

Default value:

 undef

General options

--config-path=s

Set path to configuration file.

Can be specified multiple times.

--config-profile=s

Set configuration profile to use.

--format-options=s

Pass options to formatter.

--format=s

Choose output format, e.g. json, text.

--help, -h, -?

Display this help message.

--json

Equivalent to --format=json-pretty.

--no-config

Do not use any configuration file.

--perl

Equivalent to --format=perl.

--version, -v

Show version.

--yaml

Equivalent to --format=yaml.

Ordering options

--sort=s

Order records according to certain field(s).

Default value:

 undef

A list of field names separated by comma. Each field can be prefixed with '-' to specify descending order instead of the default ascending.

FILES

/etc/osnames.conf

~/osnames.conf

COMPLETION

This script has shell tab completion capability with support for several shells.

bash

To activate bash completion for this script, put:

 complete -C osnames osnames

in your bash startup (e.g. ~/.bashrc). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.

It is recommended, however, that you install shcompgen which allows you to activate completion scripts for several kinds of scripts on multiple shells. Some CPAN distributions (those that are built with Dist::Zilla::Plugin::GenShellCompletion) will even automatically enable shell completion for their included scripts (using shcompgen) at installation time, so you can immadiately have tab completion.

tcsh

To activate tcsh completion for this script, put:

 complete osnames 'p/*/`osnames`/'

in your tcsh startup (e.g. ~/.tcshrc). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.

It is also recommended to install shcompgen (see above).

other shells

For fish and zsh, install shcompgen as described above.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/App-osnames.

SOURCE

Source repository is at https://github.com/perlancar/perl-App-osnames.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-osnames

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.