Ticket #4271: text.sh.v2.diff
File text.sh.v2.diff, 1.0 KB (added by ZlatkO, 3 years ago) |
---|
-
text.sh
old new 10 10 11 11 [ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="xdg-open" 12 12 13 get_awk() { 14 if [ -n "${MC_AWK}" ]; then 15 echo "${MC_AWK}" 16 else 17 # awk implementations from https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Programs.html 18 # if awk on your system is not one from this list, then set $MC_AWK accordingly 19 for local_awk in gawk mawk nawk awk; do 20 if which ${local_awk} &> /dev/null; then 21 echo "${local_awk}" 22 break 23 fi 24 done 25 fi 26 } 27 13 28 get_unpacker() { 14 29 filetype=$1 15 30 case "${filetype}" in … … 47 62 48 63 unpacker=`get_unpacker ${filetype}` 49 64 65 mc_awk=`get_awk` 66 if [ -n "${mc_awk}" ]; then 67 ppid_of_ppid=`ps jhp ${PPID} | ${mc_awk} '{print $1}'` 68 export MANWIDTH="`stty size < /proc/${ppid_of_ppid}/fd/0 | cut -f2 -d' '`" 69 fi 70 50 71 case "${filetype}" in 51 72 man) 52 73 case "${MC_EXT_FILENAME}" in