Skip to content

Commit

Permalink
Merge pull request #13 from ramiro-l/fix-preview-and-emoji-skip
Browse files Browse the repository at this point in the history
fix: Fixed a naming bug and added emoji_skip in sc.toml
  • Loading branch information
romancitodev authored Jul 3, 2024
2 parents 2838d50 + 78270fb commit 32a4713
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</div>

A little CLI written in rust to improve your dirty commits into **conventional** ones.
## 👀 Demo _(coming soon)_

## 👀 Demo _(coming soon)_

## ✨ Features

Expand All @@ -17,7 +17,6 @@ A little CLI written in rust to improve your dirty commits into **conventional**
- Custom templates
- Written in rust


## 📥 Installation _(not available yet)_

Install it using cargo!
Expand All @@ -26,15 +25,15 @@ Install it using cargo!
cargo install simple-commits
```


## 🛠 Configuration

in your `~/$CONFIG_FOLDER` create a `sc` directory with a `config.toml` inside.

> [!TIP]
> ```bash
> mkdir ~/$CONFIG_FOLDER/sc && touch ~/$CONFIG_FOLDER/sc/config.toml
> ```
> [!TIP]
>
> ```bash
> mkdir ~/$CONFIG_FOLDER/sc && touch ~/$CONFIG_FOLDER/sc/config.toml
> ```
and use this template to configure it as you want.
Expand All @@ -46,9 +45,13 @@ scopes = ["app", "lib", "docs"]
# By default the skip preview flag is setted to false because we know
# It's a dangerous action.
skip_preview = true
skip_emoji = true
# Customize your commit template as you want
commit_template = ["git", "commit", "-m", "{{message}}", "&&", "git", "push"]
```
## 💻 Usage

To use it you just need to run one command. 😍
Expand All @@ -59,8 +62,9 @@ sc

or if you prefer to want to use flags:

| flags | Description |
| ----- | ----------- |
| `-s` \| `--skip-preview` | ⚠️ Skips the preview step (Dangerous) |
| flags | Description |
| --------------------------- | -------------------------------------------- |
| `-p` \| `--skip-preview` | ⚠️ Skips the preview step (Dangerous) |
| `-e` \| `--skip-emoji` | Skips the emoji step |
| `-c` \| `--commit-template` | Command to run after generate commit message |
| `--config` | Set the config path |
| `--config` | Set the config path |
1 change: 1 addition & 0 deletions sc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ scopes = [

[git]
skip_preview = false
skip_emojis = false
4 changes: 2 additions & 2 deletions src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ pub struct SimpleCommitsConfig {
#[derive(Clone, Default, Serialize, Deserialize, Parser, Merge)]
pub struct GitConfig {
/// Confirm before to run git commit
#[clap(long, short)]
#[arg(short = 'p', long = "skip-preview")]
pub skip_preview: bool,

/// Confirm before to run git commit
#[clap(long, short)]
#[arg(short = 'e', long = "skip-emojis")]
pub skip_emojis: bool,

/// Command to run after generate commit message
Expand Down

0 comments on commit 32a4713

Please sign in to comment.