Skip to content

Commit

Permalink
simplified use of jq
Browse files Browse the repository at this point in the history
  • Loading branch information
wipu committed Apr 4, 2024
1 parent b0d0e6f commit a1c361c
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,9 @@ native-path-ascii() {
# the \uXXXX format
to-ascii() {
local IN=$1
to-json-array "$IN" |
echo "\"$IN\"" |
jq -ac |
sed 's/^\["//' | sed 's/"]$//'
}

to-json-array() {
local IN=$1
echo '["'$IN'"]'
sed 's/^"//' | sed 's/"$//'
}

native-path() {
Expand Down

0 comments on commit a1c361c

Please sign in to comment.