Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
ion
ion
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 94
    • Issues 94
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • redox-os
  • ionion
  • Issues
  • #506

Closed
Open
Opened Aug 18, 2017 by Michael Aaron Murphy@mmstickMaintainer

dmenu 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 @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 (closed)? I'm not sure here.

Assignee
Assign to
Ion Shell v1.0.0
Milestone
Ion Shell v1.0.0
Assign milestone
Time tracking
None
Due date
None
Reference: redox-os/ion#506