-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshellLog
More file actions
executable file
·50 lines (43 loc) · 1.75 KB
/
shellLog
File metadata and controls
executable file
·50 lines (43 loc) · 1.75 KB
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
#!/usr/bin/env bash
#
# ############################################################################
# Project: scripts (none)
# File...: shellLog
# Created: Saturday, 2025/02/08 - 19:30:30
# Author.: fbnmtz, (fabiano.matoz@gmail.com)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Last Modified: Sunday, 2025/02/09 - 11:42:06
# Modified By..: @fbnmtz, (fabiano.matoz@gmail.com)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Version: 0.0.2.40
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Description:
# >
# ############################################################################
# HISTORY:
#
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~
# Source the initialization script
source "$xSHELL_INIT"
# Use necessary libraries and modules
use args colors shellLog.lib
# Ensure required tools are installed
xrequirements sqlite3
# Initialize the application
_app_init
# Define command-line arguments
xarg --id -i,--import --var filename+o --desc "import bash_history"
xarg --id -l,--list --desc "list all commands"
xarg --id -s,--search --desc "search in command history"
xarg --id -c,--clear --desc "clear the database"
xarg --id -v,--verbose --desc "enable verbose mode"
# Run the script with the provided arguments
xrun --xrequire-one --xversionrc --xcolors --xapp-home "$@"
# Handle the command-line arguments
case "${xarg}" in
i) fImport "$filename" ;;
l) fListAll ;;
s) fSearchHistory ;;
c) fClearDb ;;
v) VERBOSE=true ;;
esac