Skip to content

Commit

Permalink
Remove uses of declare
Browse files Browse the repository at this point in the history
  • Loading branch information
b3nj5m1n committed May 14, 2022
1 parent f6fa95e commit 4efb805
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xdg-ninja.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ printf "\n"
# Function to expand environment variables in string
# https://stackoverflow.com/a/20316582/11110290
apply_shell_expansion() {
declare data="$1"
declare delimiter="__apply_shell_expansion_delimiter__"
declare command="cat <<$delimiter"$'\n'"$data"$'\n'"$delimiter"
data="$1"
delimiter="__apply_shell_expansion_delimiter__"
command="cat <<$delimiter"$'\n'"$data"$'\n'"$delimiter"
eval "$command"
}

Expand Down

0 comments on commit 4efb805

Please sign in to comment.