Skip to content

Make this project POSIX Compliant #27

Description

@calebe94

Expected Behavior

Make this project POSIX Compliant.

Current Behavior

Log from shellcheck:

In dmenu_tbm line 23:
DMENU_ARGS=$@
           ^-- SC2124: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.


In dmenu_tbm line 41:
    selection=$(echo "$actions" | dmenu -p "$bookmark" $DMENU_ARGS)
                                                       ^---------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    selection=$(echo "$actions" | dmenu -p "$bookmark" "$DMENU_ARGS")


In dmenu_tbm line 42:
    if [ ! -z "$selection" ]; then
         ^-- SC2236: Use -n instead of ! -z.


In dmenu_tbm line 46:
                [ -z "$url" ] && echo "No url given!" | dmenu -p "Error" $DMENU_ARGS || xdg-open "$url"
                              ^-- SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
                                                                         ^---------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
                [ -z "$url" ] && echo "No url given!" | dmenu -p "Error" "$DMENU_ARGS" || xdg-open "$url"


In dmenu_tbm line 53:
                choice=$(echo "no\nyes" | dmenu -p "Are you sure?" $DMENU_ARGS)
                              ^-------^ SC2028: echo may not expand escape sequences. Use printf.
                                                                   ^---------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
                choice=$(echo "no\nyes" | dmenu -p "Are you sure?" "$DMENU_ARGS")


In dmenu_tbm line 56:
                    [ -z "$id" ] && echo "No id given!" | dmenu -p "Error" $DMENU_ARGS || tbm -d "$id"
                                 ^-- SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
                                                                           ^---------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
                    [ -z "$id" ] && echo "No id given!" | dmenu -p "Error" "$DMENU_ARGS" || tbm -d "$id"


In dmenu_tbm line 76:
    selection=$(echo "$bookmarks" | dmenu -p "Bookmarks" $DMENU_ARGS)
                                                         ^---------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    selection=$(echo "$bookmarks" | dmenu -p "Bookmarks" "$DMENU_ARGS")


In dmenu_tbm line 77:
    if [ ! -z "$selection" ]; then
         ^-- SC2236: Use -n instead of ! -z.


In dmenu_tbm line 81:
            [ -z "$status" ] && echo "No url on clipboard!" | dmenu -p "Error" $DMENU_ARGS || echo "$status"
                                                                               ^---------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
            [ -z "$status" ] && echo "No url on clipboard!" | dmenu -p "Error" "$DMENU_ARGS" || echo "$status"

For more information:
  https://www.shellcheck.net/wiki/SC2124 -- Assigning an array to a string! A...
  https://www.shellcheck.net/wiki/SC2015 -- Note that A && B || C is not if-t...
  https://www.shellcheck.net/wiki/SC2028 -- echo may not expand escape sequen...

Possible Solution

Steps to Reproduce

Context (Environment)

Detailed Description

Possible Implementation

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions