feat: add prompt file
8f786f1-add-alias-for-all-commands.md
This commit is contained in:
1 file changed
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: Add alias for all commands
|
||||
state: completed
|
||||
model: infomaniak/moonshotai/Kimi-K2.6
|
||||
input_tokens:
|
||||
---
|
||||
|
||||
# Run 18
|
||||
|
||||
Note: @Clanker refers to the "ai agent" (you) who is working on this task.
|
||||
|
||||
@Clanker when working on this task, make sure to:
|
||||
|
||||
- Read context and task section first
|
||||
- Prepare a list of todos
|
||||
- Update the todo list while working on the task
|
||||
|
||||
## Context
|
||||
|
||||
Read the `AGENTS.md` and `README.md` to get an understanding of the project.
|
||||
|
||||
## Task
|
||||
|
||||
I already have an alias for the task script called `t`. Now I would like to have task aliases for all commands in `bin`.
|
||||
|
||||
Intstead of running `task commit-with-llm` I want to run `t cwl`. The first letters of the command become the command alias.
|
||||
|
||||
Propose a way to define command aliases. My ideas is appending
|
||||
|
||||
```bash
|
||||
|
||||
cwl() {
|
||||
commit-with-llm
|
||||
}
|
||||
```
|
||||
|
||||
to `bin/commit-with-llm`.
|
||||
|
||||
## Worklog
|
||||
|
||||
@Clanker Implemented aliases by appending a short function to every script in `bin/` that calls the original command with `"$@"` to pass through arguments. Collision detection ensures each alias is unique: the base alias is built from the first letter of each word, and if two commands collide or would shadow a standard shell command (e.g. `cd`, `ls`, `cp`), the conflicting word is extended with additional letters until the alias is safe and unique. For example `copy-dotenv` → `cod` and `create-dotenv` → `crd`. Shell syntax was verified with `bash -n`.
|
||||
|
||||
@Clanker Set frontmatter state to completed.
|
||||
Reference in new issue
Block a user