Skip to content

Make this project POSIX Compliant. #10

Description

@calebe94

Expected Behavior

Make this project POSIX Compliant.

Current Behavior

Log from shellcheck:

In tmenu line 29:
if [ ! -d "`dirname "$CACHE"`" ]; then
           ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
if [ ! -d "$(dirname "$CACHE")" ]; then


In tmenu line 34:
	if stest -dqr -n "$CACHE" $PATH; then
                                  ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	if stest -dqr -n "$CACHE" "$PATH"; then


In tmenu line 35:
		stest -flx $PATH | sort -u > "$CACHE"
                           ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		stest -flx "$PATH" | sort -u > "$CACHE"


In tmenu line 47:
  sub_item="$($TYAML_COMMAND -k $current_path)"
                                ^-----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
  sub_item="$($TYAML_COMMAND -k "$current_path")"


In tmenu line 51:
    command="$($TYAML_COMMAND -v $current_path)"
                                 ^-----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    command="$($TYAML_COMMAND -v "$current_path")"


In tmenu line 52:
    if [ -z "$command" ] && [ ! -z "$selected_tag" ]; then
                              ^-- SC2236: Use -n instead of ! -z.


In tmenu line 54:
    elif [ "${command[@]}" != "null" ]; then
           ^-------------^ SC2198: Arrays don't work as operands in [ ]. Use a loop (or concatenate with * instead of @).


In tmenu line 65:
    $TYAML_COMMAND -k $current_path
                      ^-----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    $TYAML_COMMAND -k "$current_path"


In tmenu line 71:
  tag_selected="$(list_items | dmenu -p $menu_prompt)"
                                        ^----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
  tag_selected="$(list_items | dmenu -p "$menu_prompt")"

For more information:
  https://www.shellcheck.net/wiki/SC2198 -- Arrays don't work as operands in ...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
  https://www.shellcheck.net/wiki/SC2006 -- Use $(...) notation instead of le...

Possible Solution

Steps to Reproduce

Context (Environment)

Detailed Description

Possible Implementation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions