Compare commits

...

2 Commits

Author SHA1 Message Date
da945dce2d add LICENSE 2021-03-23 14:35:50 +01:00
ee7a0868a8 Update README.md: Mention repos, minor improvements 2021-03-23 14:35:50 +01:00
2 changed files with 36 additions and 6 deletions

6
LICENSE Normal file
View File

@ -0,0 +1,6 @@
Copyright 2021 lawl (github.com/lawl)
Copyright 2021 Albert S. <hs9001 at quitesimple org>
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@ -1,15 +1,39 @@
# hs9001
hs90001 (history search 9001) is an easy, quite simple bash history enhancement. It simply writes all
hs9001 (history search 9001) is an easy, quite simple bash history enhancement. It simply writes all
your bash commands into an sqlite database. You can then search this database.
## Setup
## Install
### From source
```
go build
#move hs9001 to a PATH location
# Initialize database
```
### Debian / Ubuntu
Latest release can be installed using apt
```
curl -s https://repo.quitesimple.org/repo.quitesimple.org.asc | sudo apt-key add -
echo "deb https://repo.quitesimple.org/debian/ default main" | sudo tee /etc/apt/sources.list.d/quitesimple.list
sudo apt-get update
sudo apt-get install hs9001
```
### Alpine
```
wget https://repo.quitesimple.org/repo%40quitesimple.org-5f3d101.rsa.pub -O /etc/apk/repo@quitesimple.org-5f3d101.rsa.pub
echo "https://repo.quitesimple.org/alpine/quitesimple/" >> /etc/apk/repositories
apk update
apk add hs9001
```
### Setup / Config
```
hs9001 init
````
```
Add this to .bashrc
@ -18,7 +42,7 @@ if [ -n "$PS1" ] ; then
PROMPT_COMMAND='hs9001 -ret $? add "$(history 1)"'
fi
```
By default, every system user gets his own database. You can override this by overriding the environment variable
By default, every system user gets his own database. You can override this by setting the environment variable
for all users that should write to your unified database.
```
@ -29,7 +53,7 @@ export HS9001_DB_PATH="/home/db/history.sqlite"
### Search
```
hs9001 search "term"
hs9001 search [search terms]
```
It is recommended to create an alias for search to make life easier, e. g.: