NAME

tabnoun - A game played by shell tab completion

VERSION

This document describes version 0.001 of tabnoun (from Perl distribution Games-TabNoun), released on 2021-09-21.

SYNOPSIS

To start playing the game:

% tabnoun <enter>

A demo screencast:

DESCRIPTION

Welcome to tabnoun, a game played with tab completion. You must first enable tab completion for your shell. Here's how to do it in the various shells:

  • bash

    % complete -C tabnoun tabnoun

    Or alternatively, install shcompgen from CPAN using cpanm -n App::shcompgen.

  • tcsh

    % complete tabnoun 'p/*/`tabnoun`/'

    Or alternatively, install shcompgen from CPAN using cpanm -n App::shcompgen.

  • zsh

    Put a file named _tabnoun containing the text below somewhere to your fpath:

    #compdef tabnoun
    _tabnoun() {
      si=$IFS
      compadd -- $(COMP_LINE=$BUFFER COMP_POINT=$CURSOR tabnoun)
      IFS=$si
    }
    _tabnoun "$@"

    Or alternatively, install shcompgen from CPAN using cpanm -n App::shcompgen.

  • fish

    % complete -c tabnoun -f -a '(begin; set -lx COMP_SHELL fish; set -lx COMP_LINE (commandline); set -lx COMP_POINT (commandline -C); tabnoun; end)'

The objective of the game is to select nouns 7 times as fast as possible, each from a list of 5 words. For each noun, you type "tabnoun " then press Tab (Tab) to see the list of words. You can now select the noun by typing it manually or by completing it using tab completion. After that, press Enter to clock in your time for the noun. Your points will be determined from how fast you entered the noun. Do the same for the rest of the nouns to get the total score.

OPTIONS

--help

Display help and exit.

--version

Display version and exit.

--reset-game

Reset game.

--reset-high-scores

Reset high scores.

--high-scores

Show high scores and exit.

HOMEPAGE

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

SOURCE

Source repository is at https://github.com/perlancar/perl-Games-TabNoun.

SEE ALSO

This game serves as a demo of the Complete module family, including Complete::Bash, Complete::Util, and so on.

Other games played by tab completion: Games::Tabnoun

AUTHOR

perlancar <perlancar@cpan.org>

CONTRIBUTING

To contribute, you can send patches by email/via RT, or send pull requests on GitHub.

Most of the time, you don't need to build the distribution yourself. You can simply modify the code, then test via:

% prove -l

If you want to build the distribution (e.g. to try to install it locally on your system), you can install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla plugin and/or Pod::Weaver::Plugin. Any additional steps required beyond that are considered a bug and can be reported to me.

COPYRIGHT AND LICENSE

This software is copyright (c) 2021 by perlancar <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.

BUGS

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

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.