diff options
author | ccoVeille <3875889+ccoVeille@users.noreply.github.com> | 2024-07-05 09:46:53 +0200 |
---|---|---|
committer | Tim Oram <dev@mitmaro.ca> | 2024-07-05 07:08:02 -0400 |
commit | d046e9856c2495a6bd3f9d48a619328f788e1383 (patch) | |
tree | 4076fd18f526004cc8b2f9227f660f23c91753dd | |
parent | b5b7dc6204553a0998c46b28281c3a5ad183e545 (diff) |
chore: add identifier to fenced block
-rw-r--r-- | README.md | 58 | ||||
-rw-r--r-- | readme/customization.md | 14 | ||||
-rw-r--r-- | readme/install.md | 58 |
3 files changed, 92 insertions, 38 deletions
@@ -125,19 +125,25 @@ exec script.sh "exec" "command" "new-command" ### Most systems - git config --global sequence.editor interactive-rebase-tool +```shell +git config --global sequence.editor interactive-rebase-tool +``` ### Windows #### Standard Command Prompt and Windows Terminal - git config --global sequence.editor "'C:/path/to/interactive-rebase-tool.exe'" +```shell +git config --global sequence.editor "'C:/path/to/interactive-rebase-tool.exe'" +``` #### GitBash GitBash requires the use of `winpty` in order to work correctly, so to set the editor use: - git config --global sequence.editor "winpty /c/path/to/interactive-rebase-tool.exe" +```shell +git config --global sequence.editor "winpty /c/path/to/interactive-rebase-tool.exe" +``` #### Notes @@ -147,7 +153,9 @@ Windows before version 10 has [serious rendering issues with saturated darker co You can temporarily use a different sequence editor by using the `GIT_SEQUENCE_EDITOR` environment variable: - GIT_SEQUENCE_EDITOR=emacs git rebase -i [<upstream> [<branch>]] +```shell +GIT_SEQUENCE_EDITOR=emacs git rebase -i [<upstream> [<branch>]] +``` ## Direct Usage @@ -245,22 +253,28 @@ To start developing the project, you will need to [install Rust][install-rust], This project uses [cargo-make](https://github.com/sagiegurari/cargo-make) as a task runner. To install: - cargo install --force cargo-make +```shell +cargo install --force cargo-make +``` #### Debian and derivatives If you plan to build a release package you will need `pkg-config` and `liblzma-dev`. They can be installed using `apt`: - sudo apt install pkg-config liblzma-dev +```shell +sudo apt install pkg-config liblzma-dev +``` ### Build and run To build or run the project, from the project root run: - # only build - cargo make build --release - # build and run - cargo run -- <path-to-git-rebase-todo-file> +```shell +# only build +cargo make build --release +# build and run +cargo run -- <path-to-git-rebase-todo-file> +``` Sample rebase todo files can be found in ./test/fixtures. @@ -268,33 +282,43 @@ Sample rebase todo files can be found in ./test/fixtures. Automated tests are available for all features and can be run with: - cargo make test +```shell +cargo make test +``` ### Docs API docs for the project are generated using Rust Doc: - cargo make docs +```shell +cargo make docs +``` ### Linting -An addition to the lints provided by rustc, this project uses Clippy to provide additional linting, run with: +An addition to the lints provided by `rustc`, this project uses `Clippy` to provide additional linting, run with: - cargo make lint +```shell +cargo make lint +``` This will run lints using stable and nightly. The nightly lints may show errors, but will not result in a failure. ### Format -This project uses rust-fmt to provide a consistent format. A helpful script will ensure that all files are formatted correctly: +This project uses `rust-fmt` to provide a consistent format. A helpful script will ensure that all files are formatted correctly: - cargo make format +```shell +cargo make format +``` ### Coverage The project use [Tarpaulin](https://github.com/xd009642/tarpaulin) to generate coverage reports. Coverage reports are used to find gaps in tests. To generate the coverage report: - cargo make coverage +```shell +cargo make coverage +``` An addition to the report printed to the CLI, an HTML report can be found in the `coverage` directory. diff --git a/readme/customization.md b/readme/customization.md index 523ecec..91d8447 100644 --- a/readme/customization.md +++ b/readme/customization.md @@ -15,7 +15,9 @@ The tool can be customized using the [git config](https://git-scm.com/docs/git-c ### Example - git config --global interactive-rebase-tool.foregroundColor black +```shell +git config --global interactive-rebase-tool.foregroundColor black +``` ## Git Configuration @@ -149,10 +151,12 @@ Most keys can be changed to any printable character or supported special charact ### Example - # single value - git config --global interactive-rebase-tool.inputRebase S - # multiple values - git config --global interactive-rebase-tool.inputRebase "S L K" +```shell +# single value +git config --global interactive-rebase-tool.inputRebase S +# multiple values +git config --global interactive-rebase-tool.inputRebase "S L K" +``` ### Supported Special Keys diff --git a/readme/install.md b/readme/install.md index 820e7b2..a7928af 100644 --- a/readme/install.md +++ b/readme/install.md @@ -22,7 +22,9 @@ Download the `.deb` file from the [releases page][releases] and install with: - sudo dpkg -i /path/to/git-interactive-rebase-tool-*.deb +```shell +sudo dpkg -i /path/to/git-interactive-rebase-tool-*.deb +``` The executable will be installed to `/usr/bin`. @@ -30,15 +32,19 @@ The executable will be installed to `/usr/bin`. Download the `.rpm` file from the [releases page][releases] and install with your package manager of choice: - sudo rpm -i /path/to/git-interactive-rebase-tool-*.rpm - sudo yum localinstall /path/to/git-interactive-rebase-tool-*.rpm - sudo dnf localinstall /path/to/git-interactive-rebase-tool-*.rpm +```shell +sudo rpm -i /path/to/git-interactive-rebase-tool-*.rpm +sudo yum localinstall /path/to/git-interactive-rebase-tool-*.rpm +sudo dnf localinstall /path/to/git-interactive-rebase-tool-*.rpm +``` ### macOS #### With [Homebrew](https://brew.sh/) - brew install git-interactive-rebase-tool +```shell +brew install git-interactive-rebase-tool +``` #### Manual install @@ -65,7 +71,9 @@ Download the binary from the [releases page][releases] and copy it as `interacti The project can be installed directly from [crates.io](https://crates.io/crates/git-interactive-rebase-tool) via cargo. - cargo install git-interactive-rebase-tool +```shell +cargo install git-interactive-rebase-tool +``` ## Community Supported Repositories @@ -75,13 +83,17 @@ Community supported repositories are not officially supported, as they are maint Install the [git-interactive-rebase-tool](https://pkgs.alpinelinux.org/packages?name=git-interactive-rebase-tool) package from the community repository (since Alpine v3.14): - apk add git-interactive-rebase-tool +```shell +apk add git-interactive-rebase-tool +``` ### Arch Linux With your [AUR](https://aur.archlinux.org/) helper of choice: - yay -S git-interactive-rebase-tool +```shell +yay -S git-interactive-rebase-tool +``` #### Manual Install @@ -89,17 +101,23 @@ With your [AUR](https://aur.archlinux.org/) helper of choice: 2. Extract to a known location 3. Run `makepkg -si` from the extracted location -### Gnu Guix Package Manager +### GNU Guix Package Manager - guix install git-interactive-rebase-tool +```shell +guix install git-interactive-rebase-tool +``` #### In a temporary environment - guix shell git-interactive-rebase-tool +```shell +guix shell git-interactive-rebase-tool +``` #### In a temporary container (Linux namespace) - guix shell --container git-interactive-rebase-tool +```shell +guix shell --container git-interactive-rebase-tool +``` ### FreeBSD @@ -107,20 +125,28 @@ FreeBSD support is provided by the community, and while attempts are made to ens With [Ports](https://www.freebsd.org/ports/) using `pkg` - pkg install interactive_rebase_tool +```shell +pkg install interactive_rebase_tool +``` #### Manual - cd /usr/ports/devel/interactive_rebase_tool && make install clean +```shell +cd /usr/ports/devel/interactive_rebase_tool && make install clean +``` ### Windows #### With [Chocolatey](https://chocolatey.org/) - choco install git-interactive-rebase-tool +```shell +choco install git-interactive-rebase-tool +``` #### With [Scoop](https://scoop.sh/) - scoop install git-interactive-rebase-tool +```shell +scoop install git-interactive-rebase-tool +``` [releases]:https://github.com/MitMaro/git-interactive-rebase-tool/releases |