-
Notifications
You must be signed in to change notification settings - Fork 17
/
config
118 lines (92 loc) · 3.63 KB
/
config
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#
# Copyright 2017 Carl Anderson
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# This file is intended to be sourced! All variables declared here will exist
# in the shell environment. This is to prevent opening and parsing a config
# file once for every single command issued at the prompt.
#
#
# All declared variables MUST be named with a common prefix of ASH_CFG_
#
# Also, all variables must conform to the form: ASH_CFG_FOO='value'.
# This means mandatory quotes (single or double).
#
# Examples:
# GOOD:
# ASH_CFG_LOG_FILE='/tmp/ash.log'
# ASH_CFG_DB_FAIL_TIMEOUT='20'
# BAD:
# ASH_CFG_LOG_FILE=/tmp/ash_log # Error: missing quotes
# LOG_FILE='/tmp/ash.log' # Error: missing ASH_CFG_ prefix.
#
#
# Setup:
#
# ASH_CFG_LIB - The directory containing the sourced shell code.
# Default: '/usr/local/lib/advanced_shell_history/sh'
ASH_CFG_LIB='/usr/local/lib/advanced_shell_history/sh'
#
# General:
#
# ASH_CFG_HIDE_USAGE_FOR_NO_ARGS - Block help output if no args are used.
ASH_CFG_HIDE_USAGE_FOR_NO_ARGS='false' # Default: false
# ASH_CFG_MOTD - Displayed when new sessions begin followed by the session id.
# If unset, no session ID numbers will be shown.
# Default: 'Advanced Shell History enabled'
ASH_CFG_MOTD='Advanced Shell History enabled: '
#
# Logging:
#
# ASH_CFG_LOG_FILE - Defines where logged messages are written.
ASH_CFG_LOG_FILE="${HOME}/.ash/ash.log" # Default: ~/.ash/ash.log
# ASH_CFG_LOG_LEVEL - The minimum severity level that is logged to
# ASH_CFG_LOG_FILE.
# Severities (in increasing order):
# DEBUG, INFO, WARNING, ERROR, FATAL
ASH_CFG_LOG_LEVEL='WARNING' # Default: WARNING
# ASH_CFG_LOG_DATE_FMT - The timestamp format string used by the logger.
# Default: '%Y-%m-%d %H:%M:%S %Z:'
ASH_CFG_LOG_DATE_FMT='%Y-%m-%d %H:%M:%S %Z: '
#
# Querying:
#
# ASH_CFG_DEFAULT_FORMATTER - The format used to display ash_query results.
ASH_CFG_DEFAULT_FORMAT='auto' # Default: auto
# ASH_CFG_SYSTEM_QUERY_FILE - The system-wide file of available queries.
ASH_CFG_SYSTEM_QUERY_FILE='/usr/local/etc/advanced-shell-history/queries'
#
# Database:
#
# ASH_CFG_HISTORY_DB - The database storing all the entered commands.
#
ASH_CFG_HISTORY_DB="${HOME}/.ash/history.db" # Default: ~/.ash/history.db
# ASH_CFG_DB_MAX_RETRIES - Determines how many times an insert will be retried
# before the insert fails.
ASH_CFG_DB_MAX_RETRIES='30' # Default: 30
# ASH_CFG_DB_FAIL_TIMEOUT - Sleep this many ms between failed insert attempts.
ASH_CFG_DB_FAIL_TIMEOUT='2' # Default: 2
# ASH_CFG_DB_FAIL_RANDOM_TIMEOUT - Sleep up to this many additional random ms
# between failed insert attempts.
ASH_CFG_DB_FAIL_RANDOM_TIMEOUT='4' # Default: 4
#
# Unix:
#
# ASH_CFG_SKIP_LOOPBACK - skip collecting loopback interface IP addresses.
ASH_CFG_SKIP_LOOPBACK='true' # Default: true
# ASH_CFG_LOG_IPV4 - Log ipv4 addresses for the session.
ASH_CFG_LOG_IPV4='true' # Default: true
# ASH_CFG_LOG_IPV6 - Log ipv6 addresses for the session.
ASH_CFG_LOG_IPV6='true' # Default: true