<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC 
   "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.docbook.org/xml/4.5/docbookx.dtd"
[
  <!ENTITY product "command-not-found">
]>

<refentry lang="en" id="command-not-found">
   <refentryinfo>
      <productname>&product;</productname>
      <authorgroup>
         <author>
            <contrib>Developer</contrib>
            <firstname>Pavol</firstname>
            <surname>Rusnak</surname>
            <email>stick@gk2.sk</email>
         </author>
      </authorgroup>
   </refentryinfo>
   <refmeta>
      <refentrytitle>&product;</refentrytitle>
      <manvolnum>1</manvolnum>
      <refmiscinfo class="version">@VERSION@</refmiscinfo>
      <refmiscinfo class="source">https://github.com/openSUSE/scout</refmiscinfo>
      <refmiscinfo class="manual">https://en.opensuse.org/Scout</refmiscinfo>
   </refmeta>

   <refnamediv>
      <refname>&product;</refname>
      <refpurpose>A command-not-found handler</refpurpose>
   </refnamediv>

   <refsynopsisdiv id="cnf.synopsis">
      <title>Synopsis</title>
      <cmdsynopsis><command>command-not-found</command>
         <arg choice="req">binary_name</arg>
         <arg choice="req">repository</arg>
      </cmdsynopsis>
   </refsynopsisdiv>

   <refsect1 id="cnf.options">
      <title>Arguments</title>
      <para>The following arguments are required:</para>
      <variablelist>
         <varlistentry>
            <term><option>binary_name</option></term>
            <listitem>
               <para>The name of the binary you are looking for.</para>
            </listitem>
         </varlistentry>
         <varlistentry>
            <term><option>repository</option></term>
            <listitem>
               <para>The name of the repository to search. For most cases, use zypp</para>
            </listitem>
         </varlistentry>
      </variablelist>
   </refsect1>

   <refsect1 id="cnf.description">
      <title>Description</title>
      <para>the command-not-found handler searches the package a missing
          command belongs to.</para>
      <para>The handler is integrated into the bash(1) and zsh(1) shells and doesn't
          need to be called directly. Just type the name of a command in your
          favourite shell and you&apos;ll get a result.</para>
      <para>If you consider the c-n-f handler useless, just add <code>unset
              command_not_found_handle</code> to your profile or remove the command-not-found package.</para>
      <para>The handler doesn&apos;t call the command-not-found binary directly, it only prints info about it.
          If you want to invoke it automatically, just add <code>export COMMAND_NOT_FOUND_AUTO=1</code>
          to your bash profile.</para>
      <para>If you want to install found packages, add <code>export COMMAND_NOT_FOUND_INSTALL=1</code>
          to your bash profile.</para>
   </refsect1>

   <refsect1 id="cnf.example">
      <title>Example: Normal usage</title>
      <para>For example you want to try <filename>blender</filename>, because
          you have heard that is an amazing program. So just type blender in
          your shell:</para>
      <screen><prompt>$ </prompt><command>blender</command></screen>
      <para>You get the following output:</para>
      <screen>
The program &apos;blender&apos; can be found in the following package:
  * blender [ path: /usr/bin/blender, repository: zypp (openSUSE 11.1-0) ]

Try installing with:
    sudo zypper install blender

bash: blender: command not found</screen>
   </refsect1>

   <refsect1 id="cnf.seealso">
      <title>See also</title>
      <para>scout(1)</para>
   </refsect1>

</refentry>
