github / github/copilot-cli

Bash/Zsh aliases should be visible by the copilot ! command

未關閉
#1,124 1 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視
area:tools
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### Describe the feature or problem you'd like to solve

_No response_

### Proposed solution

When using the `!` command in copilot, aliases are not accessible.

### Example prompts or workflows

Check the available aliases

```shell
$ alias

l='ls -lah'
la='ls -lAh'
ll='ls -lh'
ls='ls -G'
lsa='ls -lah'
md='mkdir -p'
```

Running any of these aliases in a terminal works fine:

```shell
$ ll

total 120
-rw-r--r-- 1 agoncal staff 1.5K Nov 26 2024 properties.tmp
-rw-r--r-- 1 agoncal staff 11K Nov 26 2024 LICENSE
```

Now, start copilot and execute an alias with the `!` command. It fails:

```shell
$ copilot

❯ ! ll
╭────────────────────────────────────────────────╮
│ /bin/sh: ll: command not found │
│ │
╰────────────────────────────────────────────────╯
```

### Additional context

- copilot v0.0.394
- macOS Sequoia 15.7.3
- bash --version 3.2.57(1)-release
- zsh --version 5.9

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。