Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • ion ion
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 84
    • Issues 84
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • redox-os
  • ionion
  • Issues
  • #959
Closed
Open
Created 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
Time tracking