The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::CSE::Command::Help - cse's help

SYNOPSIS

  cse <command> [ .. options .. ] [ -- ] [ command arguments ]

  # Search for 'Something'
  cse Something

  # Search for 'search'
  cse search search

  # Check the index.
  cse check

COMMANDS

Searches the index for matches. Requires a query string. The name of the command is optional if you are searching for a term that doesnt match a command.

Optionally, you can give a directory to retrict the search to a specific directory.

Examples:

   ## Searching for the word 'Something'
   cse Something

   ## Hello without world
   cse hello AND NOT world

   ## Same thing, but more 'Lucy-ish':
   cse hello -world

   ## Searching for the word 'search'
   cse search search

   ## Searching for the word 'Something' only in the directory './lib'
   cse search Something ./lib

   ## Searching for any term starting with 'some':
   cse search some*

   ## Search for some_method
   cse some_method

   ## Search for some_method declarations only:
   cse decl:some_method

   ## Search for some_method, excluding the files declaring it:
   cse some_method -decl:some_method

search syntax

In addition of searching for simple terms, cse supports "advanced" searches using Lucy/Lucene-like query syntax.

cse uses the Lucy query syntax.

For a full description of the supported query syntax, look there: URLucy query syntax

Examples:

  # Searching 'hello' only in perl files:
  cse 'hello mime:application/x-perl'


  # Searching ruby in everything but ruby files:
  cse -- 'ruby -mime:application/x-ruby'

  # Note the '--' that prevents the rest of the command line to be interpreted as -options.

search options

--offset (-o)

Offset in the result space. Defaults to 0.

--num (-n)

Number of result on one page. Defaults to 5.

help

Output this message. This is the default command when nothing is specified.

check

Checks the health status of the index. Also output various useful things.

index

Rebuild the index from the current directory.

index options

--dir

Directory to index. Defaults to current directory.

update

Updates the files marked as dirty (after a search) in the index.

watch

Start a deamon to update the current index on changes. This will log to syslog.

If you use the dirty files marker feature, you should disable this as it will keep the index in sync with your codebase. (See unwatch below).

unwatch

Stops the deamon that watches changes to maintain the current index.

COMMON OPTIONS

--idx

Specifies the index. Default to 'current directory'/.cse.idx

--verbose (-v)

Be more verbose.

IGNORING FILES

Just like you often want to ignore files managed by your CVS, you probably want cse to ignore some of your files at index time.

To have cse ignore files, create a .cseignore file in your current directory and add one pattern to ignore per line. Patterns should be compatible with Text::Glob and are very similar to .gitignore patterns.

With a bit of luck, you should be able to just link .cseignore to your .gitignore and things should just work.

COPYRIGHT

Copyright 2014 Jerome Eteve.

This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License v2.0.

See http://dev.perl.org/licenses/artistic.html.