Add root command to open depository with $EDITOR
- Implement openDepository function in cmd/root.go to open the depository directory in $EDITOR - Falls back to vi if $EDITOR is not set - Update README.md with new usage section documenting bare 'jade' command - Include config.go changes that move config location to depository/.jade/
This commit is contained in:
+14
-4
@@ -19,6 +19,16 @@ go build -o jade
|
||||
|
||||
## Usage
|
||||
|
||||
### Open Depository
|
||||
|
||||
```bash
|
||||
# Open the depository directory in your $EDITOR
|
||||
jade
|
||||
|
||||
# This opens ~/jade-depository (or your configured path) in your editor
|
||||
# Works great with neovim, vim, or any editor that supports directory opening
|
||||
```
|
||||
|
||||
### Initialize and List Notes
|
||||
|
||||
```bash
|
||||
@@ -77,24 +87,24 @@ jade tags
|
||||
|
||||
## Configuration
|
||||
|
||||
Configuration is stored in `~/.config/jade/config.yml` (by default).
|
||||
Configuration is stored in `<depo_path>/.jade/config.yml` and is created automatically when you first run jade.
|
||||
|
||||
Example config:
|
||||
```yaml
|
||||
depo_path: /home/user/jade-depository
|
||||
config_path: /home/user/.config/jade
|
||||
tag_prefix: "+"
|
||||
```
|
||||
|
||||
You can override these with flags:
|
||||
- `--depo`: Depository path
|
||||
- `--config`: Config directory path
|
||||
- `--config`: Config file path (if you need to override the default location)
|
||||
|
||||
## Depository Structure
|
||||
|
||||
```
|
||||
jade-depository/
|
||||
├── .jade/
|
||||
│ ├── config.yml # Configuration file
|
||||
│ └── trash/ # Deleted notes go here
|
||||
├── note-1.md
|
||||
├── note-2.md
|
||||
@@ -102,7 +112,7 @@ jade-depository/
|
||||
└── note-3.md
|
||||
```
|
||||
|
||||
The `.jade/` directory is automatically created and should be added to `.gitignore`.
|
||||
The `.jade/` directory is automatically created and contains configuration and metadata. You can optionally add it to `.gitignore` if you don't want to track it in version control.
|
||||
|
||||
## Note Format
|
||||
|
||||
|
||||
Reference in New Issue
Block a user