Skip to content

Commit

Permalink
readme fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jimoe committed Jan 6, 2021
1 parent d94d71d commit e4d67f5
Showing 1 changed file with 46 additions and 44 deletions.
90 changes: 46 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ Edit a YAML config file to describe your repositories.

## Commands

* **editor** (alias **e**) - Open repo in the editor defined for that repo
* **getdir** (alias **d**) - Get the root directory of a repo
* **tabtitle** (alias **t**) - Get terminal tab title for repo
* **editor** (alias **e**) - Open repo in the editor defined for that repo.
* **getdir** (alias **d**) - Get the root directory of a repo.
* **tabtitle** (alias **t**) - Get terminal tab title for a repo.
* **config** - Command to initialize or describe a configuration-file. Can also show you the path to the config.

After you build this cli run *repocli help* for all details
After you build this cli run `repocli help` for all commands or `repocli help <command>` for help on a command

## Build

Expand All @@ -25,6 +26,45 @@ or `sudo make build /opt/repocli` if you, for example, want to install it in the

Make sure the install directory is in you PATH, then verify by running `repocli --version`

## Example config

```yaml
editors:
- name: goland
params: nosplash <path>
- name: code
params: .
repoes:
- name: some-repo-name
path: /home/username/code/some-repo-name
editor: goland
aliases:
- some
- some-repo
terminal:
title: SOME
```
It can also handle mono-repoes:
```yaml
- name: a-monorepo-name
path: /home/username/code/a-monorepo-name
editor: code
aliases:
- amono
terminal:
title: AMONO
monorepo:
- subpath: packages/packagename
terminal:
title: A packagename
- subpath: packages/whatever
terminal:
title: A whatever
```
After the cli is built you can see a full example by running `repocli config example`

## Practical usage

`repocli editor <repo-name/alias>` works out of the box, but if you want to change directory or change terminal tab title this can only be done in the shell itself. I use **bash**, and here are som example usage you may put in your `.bashrc`
Expand Down Expand Up @@ -59,7 +99,8 @@ ec() {
}
```

You may then run for example `e somealias` or `c somealias` given that *somealias* is the name or an alias of a repo in your config-file (or even if *some-alias* is he name of your repo)
You may then run for example `e somealias` or `c somealias` given that *somealias* is the name or an alias of a
repo in your config-file (or even if *some-alias* is the name of your repo)

### Set terminal tab title in bash
```shell
Expand Down Expand Up @@ -91,42 +132,3 @@ PROMPT_COMMAND=setTabTitle
```

This should not affect your PROMPT (PS1) and it will set the tab title every time the prompt is writen

# Example config

```yaml
editors:
- name: goland
params: nosplash <path>
- name: code
params: .
repoes:
- name: some-repo-name
path: /home/username/code/some-repo-name
editor: goland
aliases:
- some
- some-repo
terminal:
title: SOME
```
It can also handle mono-repoes:
```yaml
- name: a-monorepo-name
path: /home/username/code/a-monorepo-name
editor: code
aliases:
- amono
terminal:
title: AMONO
monorepo:
- subpath: packages/packagename
terminal:
title: A packagename
- subpath: packages/whatever
terminal:
title: A whatever
```
After the cli is built you can see a full example by running `repocli config example`

0 comments on commit e4d67f5

Please sign in to comment.