github / github/copilot-cli

`/add-dir` works with `~` but not `$HOME` for home directories

Đang mở
#144 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### Describe the bug

`$HOME` is a commonly used to refer to the home directory, and I referred to it when trying to add a directory to the allow list. However, Copilot CLI doesn't seem to know how to expand it the same way it does for `~`. As a result, the directory was not successfully added to the allow list _despite_ `/add-dir` saying it was "added" which was misleading.

https://github.com/user-attachments/assets/3cf5c9e0-82e1-4c62-b5de-6b2fa06fd7f8

### Affected version

0.0.330; Commit: a8bfefe

### Steps to reproduce the behavior

1. Run `/add-dir` with a path that refers to `$HOME` (or maybe any variable)
- You should see: `Added directory to allowed list: `
2. Run `/list-dirs`
- You should see: new path _not_ listed

### Expected behavior

A few possibilities here, but the gist is that I would've expected **any behavior that was clear about what worked / what didn't**. For example:

1. The new path to be added (in raw or expanded form)
1. A successful message _was not shown_ when the path wasn't actually added
1. Support for tab-completion so that the path can be auto-expanded, increasingly the likelihood of it being added successfully

### Additional context

- macOS on ARM
- iTerm2
- zsh

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.