Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: BUG: Zsh crashes



On 01/13/2017 12:52 PM, Peter Stephenson wrote:

> You always need to report both the zsh version and, in the case of
> completion crashes, how this is set up (looks like in your case this is
> down to oh-my-zsh so I guess you don't have explicit details of your
> own setup beyond that).


With less steps:

curl https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/3705d47bb3f3229234cba992320eadc97a221caf/plugins/rust/_rust > /path/in/fpath/_rust
autoload -Uz _rust; compdef _rust rustc
rustc --pretty flowgraph==<^I>

The interesting parts of _complete_debug
```
+_description:109> return 0
+_next_label:19> set -A expl -M 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._-]=** r:|=* l:|=*' -J arguments -X 'Completing <F0>&8^A'
+_next_label:22> return 0
+_values:147> '`' -M 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._-]=** r:|=* l:|=*' -J arguments -X 'Completing <F0>&8^A' '>2^A'
_values:147: command not found: `
+_values:146> _next_label arguments expl '<F0>&8^A'
+_next_label:3> local __gopt __descr __spec
+_next_label:5> __gopt=( )
+_next_label:6> zparseopts -D -a __gopt 1 2 V J x
```

and

```
+_description:13> [[ -n files ]]
+_description:13> _lastdescr=( '' TYPE NODEID files directories '<F0>&8^A' files )
+_description:15> zstyle -s :completion::complete:rustc:argument-1:argument-1 group-name gname
+_description:16> [[ -z '' ]]
+_description:16> gname=argument-1
+_description:18> _setup argument-1 argument-1
```

There are a few other places where the control characters show up but i am not sure what is creating it.
I can get zsh to crash by adding a space before _values on line 52 of the completer.



Messages sorted by: Reverse Date, Date, Thread, Author