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 95
    • Issues 95
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 3
    • Merge Requests 3
  • 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
  • #795

Closed
Open
Opened Jul 14, 2018 by Michael Aaron Murphy@mmstickMaintainer

Optional Assignment Operator

It can be useful to optionally-define a variable if it has not been set, as is often seen in Make files.

let FOO ?= BAR
# FOO is now BAR
let FOO ?= BAZZ
# FOO is still BAR

Should make the following possible:

$ env OPT=FOO ./script.ion
OPT is FOO
$ ./script.ion
OPT is BAR
Edited Jul 14, 2018 by Michael Aaron Murphy
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#795