nushell: Crash while typing
Describe the bug panic while typing
To Reproduce Steps to reproduce the behavior:
- type
alias fg_blue = echo $(ansi -e '34m') - type
fg_blueand watch the crash as you type the e
Expected behavior not crash
Screenshots
01/13/2021 09:48:39.976 AM ¯\_(ツ)_/¯ ▶ alias fg_blue = echo $(ansi -e '34m')
01/13/2021 09:48:41.743 AM ¯\_(ツ)_/¯ ▶ fg_bluthread 'main' panicked at 'index out of bounds: the len is 7 but the index is 7', crates\nu-engine\src\shell\painter.rs:49:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[process exited with code 101]
Configuration (please complete the following information):
Run version | pivot and paste the output to show OS, features, etc.
| key | value |
|---|---|
| version | 0.25.2 |
| branch | main |
| short_commit | d06f457b |
| commit_hash | ‘d06f457b2a7dee3acc71ecd0dc8b6a34afbfc5d8’ |
| commit_date | 2021-01-11 22:59:53 |
| build_os | windows-x86_64 |
| rust_version | rustc 1.49.0 (e1884a8e3 2020-12-29) |
| rust_channel | stable (default) |
| cargo_version | cargo 1.49.0 (d00d64df9 2020-12-05) |
| pkg_version | 0.25.2 |
| build_time | 2021-01-12 07:29:22 |
| build_rust_channel | release |
| features | clipboard-cli, ctrlc, default, directories, dirs, git, ichwh, ptree, rich-benchmark, rustyline, term, trash, uuid, which, zip |
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (9 by maintainers)
I’m having a similar crash which seems related so putting here for now:
To Reproduce
“alias gs = git switch” in
config.nu$ gs main;<SPACE><TAB>edit: appears to be fixed at a later release
I just posted a PR #2934 that should change how alias gets its coloring. After this lands, can try again to see if it still happens?