Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
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 4
    • Merge Requests 4
  • 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
  • #959

Closed
Open
Opened Apr 22, 2020 by matu3ba@matu3baMaintainer

RFC Deprecate non-escapable single quote inside single quote block

feat: Ony can type quotes inside single quote block and has consistency in behavior for escape symbols. This also enables ' to be representable inside ''-strings.

BREAKING CHANGE: If users rely on \' being not an escaped ', their scripts break.

perf: impact

performance none

usability - consistency in learning language and in usage. no need to learn special escape case for single quotes

maintainability - This should be documented as difference to other shells.

code: input

let str1 = '\'' # valid
let str2 = '\' # invalid, because \' does escape

reason: Consistent behavior is important for usability, so cutting off unexpected cases is beneficial.

context: For arcane reasons the compatibility was not broken in other shells and you end up with quirks like echo $'I\'m a linux admin.', if you want strings with ' included.

behavior of bash/dash/zsh/fish/oil
bash,dash,zsh and oil does not escape ' inside ''-environment
fish does escape ' inside ''-environment

Edited Apr 22, 2020 by matu3ba
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: redox-os/ion#959