github.com/mborho/rem@v0.17.0/help.go (about)

     1  // rem - A tool to remember things on the command line.
     2  // Copyright (C) 2015 Martin Borho (martin@borho.net)
     3  //
     4  // This program is free software: you can redistribute it and/or modify
     5  // it under the terms of the GNU General Public License as published by
     6  // the Free Software Foundation, either version 3 of the License, or
     7  // (at your option) any later version.
     8  //
     9  // This program is distributed in the hope that it will be useful,
    10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    12  // GNU General Public License for more details.
    13  //
    14  // You should have received a copy of the GNU General Public License
    15  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    16  
    17  package main
    18  
    19  var (
    20  	help string
    21  )
    22  
    23  func init() {
    24  	help = `NAME:
    25      rem - small tool for remembering things on the command line.
    26  
    27  USAGE:
    28      rem [flags] [command] [argument]
    29  
    30  COMMANDS:
    31      -h, help - Shows this help.
    32      -a, add [string] - Adds a command/text.
    33      rm [index] - Removes line with given index number.
    34      echo [index] - Displays line with given index number.
    35      edit [index] - Opens default editor in $EDITOR for editing a command.
    36      -f, filter [regexp] - Filters stored commands by given regular expression.
    37      here - Creates a .rem file in the given directory. Default: ~/.rem
    38      clear - Clears currently active .rem file, ./.rem or ~/.rem
    39      [index|tag] - Executes line with given index number / tag name.
    40  
    41      Run 'rem' without arguments to list all stored commands/strings.
    42  
    43  FLAGS:
    44      -g - Use global rem file ~/.rem
    45      -t - Tag for command when adding with -a/add.
    46      -p - Print command to stdout before executing index/tag.
    47  
    48  EXAMPLES:
    49      rem add ls -la - Adds "ls -la" to list.
    50      rem -t list add ls -la - Adds "ls -la" to list with tag "list".
    51      rem list - Executes line tagged with "list" (ls-la)
    52      rem 2 - Executes line with index number 2.
    53      rem rm 4 - Removes line 4.
    54      rem - Lists all stored commands.
    55      `
    56  }