diff --git a/README.md b/README.md index 67f615f..dcfe622 100644 --- a/README.md +++ b/README.md @@ -21,3 +21,80 @@ git clone https://github.com/fioncat/roxide.git /path/to/roxide cd /path/to/roxide make install ``` + +## Config + +Please save config file to `$HOME/.config/roxide/config.yml`, or you can use command `roxide config` to create and edit config file directly. + +See: [config.yml](config/config.yml). + +## Shell Support + +Now we support `zsh` and `bash`, it is recommended to use `zsh` for a better experience. + +To enable completion and autojump, you need to add roxide init script to your shell profile: + +```bash +source <(roxide init $(basename $SHELL)) + +# Optional, use `zz` to implement quick jump. +alias zz="rox home" +``` + +Then you can use `cmd` in config file to autojump, default is `rox`. + +For example, use the following command to jump to roxide project: + +```bash +rox home github fioncat/roxide +``` + +## Usage + +You can use `` to complete command at any time! + +Search global repos and jump: + +```bash +rox home -s +``` + +Search repos under a remote and jump: + +```bash +rox home github -s +``` + +Search repos under a owner and jump: + +```bash +rox home github fioncat/ +``` + +Global fuzzy matching and jump: + +```bash +rox home rox # Will jump to repo whose name contains 'rox' +``` + +Fuzzy matching under remote and jump: + +```bash +rox home github rox # Will jump to whose name contains 'rox' in github +``` + +Search and remove a repo from disk: + +```bash +rox remove github fioncat/ +rox remove github fioncat/roxide +rox remove rox +``` + +Remove all repos under an owner: + +```bash +rox remove -r github fioncat/ +``` + +For more commands and usages, please see: `rox -h`. diff --git a/TODOLIST.md b/TODOLIST.md index 5e159cc..110d561 100644 --- a/TODOLIST.md +++ b/TODOLIST.md @@ -2,9 +2,9 @@ ## v0.10.0 -- [ ] Use `Cow`, to further reduce memory `clone` overhead. -- [ ] Add `index` in database, to optimize query speed. -- [ ] Use insertion sort when updating the repo instead of sorting the entire database every time the bucket is read. +- [x] Use `Cow`, to further reduce memory `clone` overhead. +- [x] Change the data structure of the database to HashMap to optimize query, update database version to `v3`. +- [x] Rebuild `snapshot` command, don't affect workspace. ## v0.9.0