Skip to content

Commit 34775e9

Browse files
authored
Remove oc alias (#178)
oc is pretty wellknow alias for OpenShift CLI Signed-off-by: Moulick Aggarwal <moulickaggarwal@gmail.com>
1 parent 3f3043c commit 34775e9

File tree

7 files changed

+27
-30
lines changed

7 files changed

+27
-30
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Interactive rebase (`rebase -i`) changes commit SHA, so commit history in remote
7676

7777
## Setup OpenCommit as a CLI
7878

79-
You can use OpenCommit by simply running it via CLI like this `oc`. 2 seconds and your staged changes are committed with a meaningful message.
79+
You can use OpenCommit by simply running it via CLI like this `oco`. 2 seconds and your staged changes are committed with a meaningful message.
8080

8181
1. Install OpenCommit globally to use in any repository:
8282

@@ -103,7 +103,7 @@ git add <files...>
103103
opencommit
104104
```
105105

106-
You can also use the `oc` shortcut:
106+
You can also use the `oco` shortcut:
107107

108108
```sh
109109
git add <files...>
@@ -133,19 +133,19 @@ Local config still has more priority as Global config, but you may set `OCO_MODE
133133
Simply run any of the variable above like this:
134134

135135
```sh
136-
oc config set OCO_OPENAI_API_KEY=gpt-4
136+
oco config set OCO_OPENAI_API_KEY=gpt-4
137137
```
138138

139139
Configure [GitMoji](https://gitmoji.dev/) to preface a message.
140140

141141
```sh
142-
oc config set OCO_EMOJI=true
142+
oco config set OCO_EMOJI=true
143143
```
144144

145145
To remove preface emoji:
146146

147147
```sh
148-
oc config set OCO_EMOJI=false
148+
oco config set OCO_EMOJI=false
149149
```
150150

151151
### Switch to GPT-4
@@ -155,7 +155,7 @@ By default OpenCommit uses GPT-3.5-turbo (ChatGPT).
155155
You may switch to GPT-4 which performs better, but costs ~x15 times more 🤠
156156

157157
```sh
158-
oc config set OCO_MODEL=gpt-4
158+
oco config set OCO_MODEL=gpt-4
159159
```
160160

161161
Make sure you do lowercase `gpt-4` and you have API access to the 4th model. Even if you have ChatGPT+ it doesn't necessarily mean that you have API access to GPT-4.
@@ -166,25 +166,25 @@ To globally specify the language used to generate commit messages:
166166

167167
```sh
168168
# de, German ,Deutsch
169-
oc config set OCO_LANGUAGE=de
170-
oc config set OCO_LANGUAGE=German
171-
oc config set OCO_LANGUAGE=Deutsch
169+
oco config set OCO_LANGUAGE=de
170+
oco config set OCO_LANGUAGE=German
171+
oco config set OCO_LANGUAGE=Deutsch
172172
173173
# fr, French, française
174-
oc config set OCO_LANGUAGE=fr
175-
oc config set OCO_LANGUAGE=French
176-
oc config set OCO_LANGUAGE=française
174+
oco config set OCO_LANGUAGE=fr
175+
oco config set OCO_LANGUAGE=French
176+
oco config set OCO_LANGUAGE=française
177177
```
178178

179-
The default language set is **English**
179+
The default language set is **English**
180180
All available languages are currently listed in the [i18n](https://github.com/di-sukharev/opencommit/tree/master/src/i18n) folder
181181

182182
### Git flags
183183

184-
The `opencommit` or `oc` commands can be used in place of the `git commit -m "${generatedMessage}"` command. This means that any regular flags that are used with the `git commit` command will also be applied when using `opencommit` or `oc`.
184+
The `opencommit` or `oco` commands can be used in place of the `git commit -m "${generatedMessage}"` command. This means that any regular flags that are used with the `git commit` command will also be applied when using `opencommit` or `oco`.
185185

186186
```sh
187-
oc --no-verify
187+
oco --no-verify
188188
```
189189

190190
is translated to :
@@ -213,13 +213,13 @@ You can set OpenCommit as Git [`prepare-commit-msg`](https://git-scm.com/docs/gi
213213
To set the hook:
214214

215215
```sh
216-
oc hook set
216+
oco hook set
217217
```
218218

219219
To unset the hook:
220220

221221
```sh
222-
oc hook unset
222+
oco hook unset
223223
```
224224

225225
To use the hook:

out/cli.cjs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16289,7 +16289,6 @@ var package_default = {
1628916289
main: "cli.js",
1629016290
bin: {
1629116291
opencommit: "./out/cli.cjs",
16292-
oc: "./out/cli.cjs",
1629316292
oco: "./out/cli.cjs"
1629416293
},
1629516294
repository: {
@@ -16904,7 +16903,7 @@ ${import_picocolors.default.magenta("\u25CB")} ${t}
1690416903
let i2 = 0, c3 = 0;
1690516904
n = setInterval(() => {
1690616905
let l = C3[i2];
16907-
process.stdout.write(import_sisteransi2.cursor.move(-999, -1)), process.stdout.write(`${import_picocolors.default.magenta(l)} ${t}${Math.floor(c3) >= 1 ? ".".repeat(Math.floor(c3)).slice(0, 3) : ""}
16906+
process.stdout.write(import_sisteransi2.cursor.move(-999, -1)), process.stdout.write(`${import_picocolors.default.magenta(l)} ${t}${Math.floor(c3) >= 1 ? ".".repeat(Math.floor(c3)).slice(0, 3) : ""}
1690816907
`), i2 = i2 === C3.length - 1 ? 0 : i2 + 1, c3 = c3 === C3.length ? 0 : c3 + 0.125;
1690916908
}, s);
1691016909
}, stop(t = "") {
@@ -21789,18 +21788,18 @@ index ad4db42..f3b18a9 100644
2178921788
@@ -10,7 +10,7 @@
2179021789
import {
2179121790
initWinstonLogger();
21792-
21791+
2179321792
const app = express();
2179421793
-const port = 7799;
2179521794
+const PORT = 7799;
21796-
21795+
2179721796
app.use(express.json());
21798-
21797+
2179921798
@@ -34,6 +34,6 @@
2180021799
app.use((_, res, next) => {
2180121800
// ROUTES
2180221801
app.use(PROTECTED_ROUTER_URL, protectedRouter);
21803-
21802+
2180421803
-app.listen(port, () => {
2180521804
- console.log(\`Server listening on port \${port}\`);
2180621805
+app.listen(process.env.PORT || PORT, () => {
@@ -21903,7 +21902,7 @@ var prepareCommitMessageHook = async (isStageAllFlag = false) => {
2190321902
if (changedFiles)
2190421903
await gitAdd({ files: changedFiles });
2190521904
else {
21906-
ce("No changes detected, write some code and run `oc` again");
21905+
ce("No changes detected, write some code and run `oco` again");
2190721906
process.exit(1);
2190821907
}
2190921908
}
@@ -22037,7 +22036,7 @@ async function commit(extraArgs2 = [], isStageAllFlag = false) {
2203722036
if (changedFiles2)
2203822037
await gitAdd({ files: changedFiles2 });
2203922038
else {
22040-
ce("No changes detected, write some code and run `oc` again");
22039+
ce("No changes detected, write some code and run `oco` again");
2204122040
process.exit(1);
2204222041
}
2204322042
}

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"main": "cli.js",
1818
"bin": {
1919
"opencommit": "./out/cli.cjs",
20-
"oc": "./out/cli.cjs",
2120
"oco": "./out/cli.cjs"
2221
},
2322
"repository": {

src/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if (!apiKey && command !== 'config' && mode !== CONFIG_MODES.set) {
2121
intro('opencommit');
2222

2323
outro(
24-
'OCO_OPENAI_API_KEY is not set, please run `oc config set OCO_OPENAI_API_KEY=<your token>. Make sure you add payment details, so API works.`'
24+
'OCO_OPENAI_API_KEY is not set, please run `oco config set OCO_OPENAI_API_KEY=<your token>. Make sure you add payment details, so API works.`'
2525
);
2626
outro(
2727
'For help look into README https://github.com/di-sukharev/opencommit#setup'

src/commands/commit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export async function commit(
138138

139139
if (changedFiles) await gitAdd({ files: changedFiles });
140140
else {
141-
outro('No changes detected, write some code and run `oc` again');
141+
outro('No changes detected, write some code and run `oco` again');
142142
process.exit(1);
143143
}
144144
}

src/commands/prepare-commit-msg-hook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const prepareCommitMessageHook = async (
2424

2525
if (changedFiles) await gitAdd({ files: changedFiles });
2626
else {
27-
outro('No changes detected, write some code and run `oc` again');
27+
outro('No changes detected, write some code and run `oco` again');
2828
process.exit(1);
2929
}
3030
}

0 commit comments

Comments
 (0)