ion issueshttps://gitlab.redox-os.org/redox-os/ion/-/issues2018-07-01T17:59:19Zhttps://gitlab.redox-os.org/redox-os/ion/-/issues/506dmenu doesn't work as expected2018-07-01T17:59:19ZMichael Aaron Murphymmstick@pm.medmenu doesn't work as expected*Created by: bb010g*
**Reproduction**:
Run the following script with no arguments and press enter when prompted:
```
#!/usr/bin/env ion
echo $join(@args[1..], "|")
let foo = $(dmenu @args[1..])
let foo = $(echo hi | dmenu @arg...*Created by: bb010g*
**Reproduction**:
Run the following script with no arguments and press enter when prompted:
```
#!/usr/bin/env ion
echo $join(@args[1..], "|")
let foo = $(dmenu @args[1..])
let foo = $(echo hi | dmenu @args[1..])
echo got foo
ion -c "echo "$foo | /usr/bin/cat
ion -c "echo "$foo | dmenu @args[1..]
echo $foo | dmenu @args[1..]
```
**Expected behavior**:
I'd expect it to work equivalently to this dash script:
```
#!/usr/bin/env dash
(IFS="|"; echo "$*")
foo="`dmenu "$@"`"
foo="`echo hi | dmenu "$@"`"
echo got foo
dash -c "echo "$foo | /usr/bin/cat
dash -c "echo "$foo | dmenu "$@"
echo $foo | dmenu "$@"
```
The output will first be a blank line followed by execution stopping as dmenu waits for input. Enter a line and press `^D` to make it prompt you and keep going. `foo` will get `hi` assigned to it. `got foo` will be printed, followed by `hi` three times.
**Actual behavior**:
Ion will cause dmenu to show up with no choices. Type `bar`, press enter, and Ion presents a proper dmenu with `hi` as the choice. `got foo` and `hi` will be printed, followed by:
```
usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]
[-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]
usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]
[-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]
```
The script exits with 1.
**Build information**: [output of `rustc -V`, `git rev-parse HEAD`, `qemu-i386 -version`, `uname -a`, etc.]
```
rustc 1.19.0 (0ade33941 2017-07-17)
HEAD: 3319ffb00e3ff54db1446302a7debd7e7f7ff893
Linux bb010g-lat 4.12.8-1-ARCH #1 SMP PREEMPT Thu Aug 17 08:37:20 CEST 2017 x86_64 GNU/Linux
dmenu -v: dmenu-4.7
```
**Blocking/related**: Maybe #424? I'm not sure here.Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/418prompt: Syntax Highlighting in Prompt2021-06-01T12:33:57ZMichael Aaron Murphymmstick@pm.meprompt: Syntax Highlighting in PromptWill require some seirous modifications to [liner](https://github.com/MovingtoMars/liner) in order to get this to work. I'm insure of the best approach for implementing this feature at the moment. Regex or a parsing crate may be ideal. S...Will require some seirous modifications to [liner](https://github.com/MovingtoMars/liner) in order to get this to work. I'm insure of the best approach for implementing this feature at the moment. Regex or a parsing crate may be ideal. Solution needs to focus on performance though. The following needs to occur:
- [ ] Color the command based on if the command exists or not
- [ ] Single quoted text should have a different color from double quoted text
- [ ] Operators should have their own unique colors
- [ ] Specific keywords should be highlighted, such as `end` and `if`
- [ ] Variables should also be highlighted
- [ ] Arrays should have a different color than variables
- [ ] Functions and aliases may also have different colors
- [ ] The coloring should be user-configurable and ideally match the grammar usage (in treesitter)Ion Shell v1.0.0Sag0Sag0Sag0Sag0