Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Possibly erroneous code example in overlays.md

Đang mở
#1,947 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
38/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
shell
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với ví dụ scoped overlay trong overlays.md và chạy ví dụ đó trong Nushell để xác nhận hành vi được báo cáo. Kiểm tra xem ví dụ hoặc phần giải thích có không chính xác hay không, sau đó cập nhật overlays.md để lệnh được ghi lại và kết quả mong đợi khớp với hành vi đã quan sát.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

The following excerpt is from overlays.md:

Removing an Overlay

If you don't need the overlay definitions anymore, call overlay hide:

(spam)> overlay hide spam

(zero)> foo
Error: Can't run executable...

(zero)> overlay list
───┬──────
 0 │ zero
───┴──────

The overlays are also scoped.
Any added overlays are removed at the end of the scope:

(zero)> do { overlay use spam; foo }  # overlay is active only inside the block
foo

(zero)> overlay list
───┬──────
 0 │ zero
───┴──────

In the second code block, running the scoped code example leads to this:

❯ do { overlay use spam; foo }
Error: nu::shell::external_command

  × External command failed
   ╭─[entry #33:1:24]
 1 │ do { overlay use spam; foo }
   ·                        ─┬─
   ·                         ╰── Command `foo` not found
   ╰────
  help: A command with that name exists in module `spam`. Try importing it with `use`

I imagine this is due to the parsing stage not recognizing the foo command since it currently isn't in scope. I assume this is by design and it's the docs that fail to mention this. Perhaps we should modify the example to prevent confusion? Or perhaps I may have missed something. Please let me know. Thanks!

Ngôn ngữ chính
TypeScript
Star
260
Fork
563
Merge trung bình
4 giờ 36 phút
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nushell/nushell.github.io

Tất cả issue của nushell/nushell.github.io

Issue tương tự

Thêm issue về TypeScript

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.