Skip to content

Commit

Permalink
Merge pull request #63 from cyberhuman/master
Browse files Browse the repository at this point in the history
Indent parentheses properly for zsh (fix #61)
  • Loading branch information
AdrieanKhisbe committed Nov 11, 2015
2 parents d022795 + d829645 commit 515eccd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resty
Expand Up @@ -29,9 +29,9 @@ function resty() {
host="$datadir/host"
cookies="$datadir/c"
method="$1"; [[ $# > 0 ]] && shift
h2t=$((exec 2>&-; (which lynx >/dev/null && echo lynx -stdin -dump) \
h2t=$( (exec 2>&-; (which lynx >/dev/null && echo lynx -stdin -dump) \
|| which html2text || which cat) |tail -n 1)
editor=$((exec 2>&-; which "$EDITOR" || which vim || echo "vi") |tail -n 1)
editor=$( (exec 2>&-; which "$EDITOR" || which vim || echo "vi") |tail -n 1)

[ "${method#P}" != "$method" ] || [ "$method" = "TRACE" ] && wantdata="yes"

Expand Down Expand Up @@ -82,7 +82,7 @@ function resty() {
[ -n "$dat" ] && opt="--data-binary"
[ "$method" = "HEAD" ] && opt="-I" && raw="yes"
[ -f "$confdir/$domain" ] && eval "args2=( $(cat "$confdir/$domain" 2>/dev/null |sed 's/^ *//' |grep ^$method |cut -b $((${#method}+2))-) )"
res=$((((curl -sLv $opt "$dat" -X $method \
res=$( ( ( (curl -sLv $opt "$dat" -X $method \
-b "$cookies/$domain" -c "$cookies/$domain" \
"${args2[@]}" "${curlopt2[@]}" "${curlopt[@]}" "$_path$query" \
|sed 's/^/OUT /' && echo) 3>&2 2>&1 1>&3) \
Expand Down

0 comments on commit 515eccd

Please sign in to comment.