Commit 524146f
authored
fix(completion): an edge case of aliased external head command (nushell#16882)
Fixes this ignored test case:
https://github.com/nushell/nushell/blob/a9263cf13489517b3a185ae1e33ecc41bddedb5f/crates/nu-cli/tests/completions/mod.rs#L2643-L2660
Previously `e<tab>` gets empty results because it dives deep into the
external head expression, `^$env.EDITOR` in this case.
This PR fixes it using the same mechanism as nushell#16876 and nushell#16640
## Release notes summary - What our users need to know
Fixed a bug in aliased external command completion where `alias ea =
^$env.EDITOR /tmp/test.s; e<tab>` gets empty result.
## Tasks after submitting1 parent 33bba81 commit 524146f
File tree
2 files changed
+23
-22
lines changed- crates/nu-cli
- src/completions
- tests/completions
2 files changed
+23
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
62 | 73 | | |
63 | 74 | | |
64 | 75 | | |
65 | | - | |
| 76 | + | |
66 | 77 | | |
67 | 78 | | |
68 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
763 | | - | |
764 | 763 | | |
765 | 764 | | |
766 | 765 | | |
767 | 766 | | |
768 | 767 | | |
769 | 768 | | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
| 769 | + | |
774 | 770 | | |
775 | 771 | | |
776 | 772 | | |
| |||
2640 | 2636 | | |
2641 | 2637 | | |
2642 | 2638 | | |
2643 | | - | |
2644 | 2639 | | |
2645 | 2640 | | |
2646 | 2641 | | |
| |||
2650 | 2645 | | |
2651 | 2646 | | |
2652 | 2647 | | |
| 2648 | + | |
| 2649 | + | |
2653 | 2650 | | |
2654 | | - | |
2655 | | - | |
2656 | | - | |
2657 | | - | |
2658 | | - | |
2659 | | - | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
2660 | 2655 | | |
2661 | 2656 | | |
2662 | | - | |
2663 | 2657 | | |
2664 | 2658 | | |
2665 | 2659 | | |
| |||
2669 | 2663 | | |
2670 | 2664 | | |
2671 | 2665 | | |
2672 | | - | |
2673 | | - | |
2674 | | - | |
2675 | | - | |
2676 | | - | |
2677 | | - | |
| 2666 | + | |
| 2667 | + | |
2678 | 2668 | | |
2679 | 2669 | | |
2680 | 2670 | | |
| |||
0 commit comments