Skip to content

bash params not work when pass special chars #366

@futurist

Description

@futurist

Describe the bug

If plugin contains below line:

echo "--delete | bash=test.sh terminal=true param1=_update param2='$name'"

The terminal will show syntax error if $name is abc(123)

To Reproduce
Steps to reproduce the behavior:

  1. put above line in test plugin
  2. click "delete" button
  3. terminal show syntax error

Expected behavior

params should be passed to bash script correctly (in quote?)

Environment:

  • macOS version: 13.2 (22D49)
  • SwiftBar version: 1.5.0

Plugin Example:

#!/bin/bash

name='abc(123)'
echo test
echo ---
echo test
echo "--delete | bash=test.sh  terminal=true param1=_update param2=id param3=delete param4='$name'"

Additional Context:

when name='abc (123)' (a space in it), the code works, but not when abc(123)

  • I don't run Bartender/Dozer/etc. or tested the issue without it running

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions