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