Move text editor settings to a separate section

This commit is contained in:
Ivan R. 2023-11-06 00:16:22 +05:00
parent f063d38424
commit 2a848ea904
No known key found for this signature in database
GPG key ID: 56C7BAAE859B302C

View file

@ -16,20 +16,8 @@ tree ~/.local/share/histd
```
## Usage
Make sure the `EDITOR` environment variable is set
to the name of your favorite text editor.
If it's not, edit the `~/.bashrc` file (or `~/.zshrc`)
```bash
export EDITOR=nano
```
Don't forget to start a new session or execute the following command:
```bash
source ~/.bashrc
```
Then mark this script as executable:
Mark this script as executable:
```bash
chmod +x histd.sh
```
@ -46,6 +34,21 @@ You can open the last note with the command:
./histd.sh last
```
## Editor configuration
When opening a text editor, the program checks the value of the `EDITOR` environment variable.
If you want to use a different editor, edit the `~/.bashrc` file (if you are using bash):
```bash
export EDITOR=nano
```
Don't forget to start a new session or execute the following command:
```bash
source ~/.bashrc
```
## Backup
To create an archive of all notes, run the following command:
```bash