Result of following commands: cp -a bash-completion-2.16.0 bash-completion-2.16.0.old find bash-completion-2.16.0/completions/ -type f -exec sed -i 's/ grep / ggrep /g' {} \; find bash-completion-2.16.0/completions/ -type f -exec sed -i 's/ sed / gsed /g' {} \; find bash-completion-2.16.0/bash_completion -type f -exec sed -i 's/ grep / ggrep /g' {} \; find bash-completion-2.16.0/bash_completion -type f -exec sed -i 's/ sed / gsed /g' {} \; gdiff -pruN bash-completion-2.16.0.old bash-completion-2.16.0 | less And check the result. --- bash-completion-2.16.0/bash_completion.orig +++ bash-completion-2.16.0/bash_completion @@ -1709,7 +1709,7 @@ _comp_compgen -v addresses split -- "$( { ip -c=never link show || ip link show || LC_ALL=C ifconfig -a - } 2>/dev/null | command sed -ne \ + } 2>/dev/null | command gsed -ne \ "s/.*[[:space:]]HWaddr[[:space:]]\{1,\}\($_re\)[[:space:]].*/\1/p" -ne \ "s/.*[[:space:]]HWaddr[[:space:]]\{1,\}\($_re\)[[:space:]]*$/\1/p" -ne \ "s|.*[[:space:]]\(link/\)\{0,1\}ether[[:space:]]\{1,\}\($_re\)[[:space:]].*|\2|p" -ne \ @@ -1720,13 +1720,13 @@ _comp_compgen -av addresses split -- "$( { arp -an || ip -c=never neigh show || ip neigh show - } 2>/dev/null | command sed -ne \ + } 2>/dev/null | command gsed -ne \ "s/.*[[:space:]]\($_re\)[[:space:]].*/\1/p" -ne \ "s/.*[[:space:]]\($_re\)[[:space:]]*$/\1/p" )" # /etc/ethers - _comp_compgen -av addresses split -- "$(command sed -ne \ + _comp_compgen -av addresses split -- "$(command gsed -ne \ "s/^[[:space:]]*\($_re\)[[:space:]].*/\1/p" /etc/ethers 2>/dev/null)" _comp_compgen -U addresses ltrim_colon "${addresses[@]}" @@ -1741,22 +1741,22 @@ if [[ -f /etc/debian_version ]]; then # Debian system _comp_expand_glob files '/etc/network/interfaces /etc/network/interfaces.d/*' || return 0 - _comp_compgen -U files split -- "$(command sed -ne \ + _comp_compgen -U files split -- "$(command gsed -ne \ 's|^iface \([^ ]\{1,\}\).*$|\1|p' "${files[@]}" 2>/dev/null)" elif [[ -f /etc/SuSE-release ]]; then # SuSE system _comp_expand_glob files '/etc/sysconfig/network/ifcfg-*' || return 0 _comp_compgen -U files split -- "$(printf '%s\n' "${files[@]}" | - command sed -ne 's|.*ifcfg-\([^*].*\)$|\1|p')" + command gsed -ne 's|.*ifcfg-\([^*].*\)$|\1|p')" elif [[ -f /etc/pld-release ]]; then # PLD Linux _comp_compgen -U files split -- "$(command ls -B /etc/sysconfig/interfaces | - command sed -ne 's|.*ifcfg-\([^*].*\)$|\1|p')" + command gsed -ne 's|.*ifcfg-\([^*].*\)$|\1|p')" else # Assume Red Hat _comp_expand_glob files '/etc/sysconfig/network-scripts/ifcfg-*' || return 0 _comp_compgen -U files split -- "$(printf '%s\n' "${files[@]}" | - command sed -ne 's|.*ifcfg-\([^*].*\)$|\1|p')" + command gsed -ne 's|.*ifcfg-\([^*].*\)$|\1|p')" fi } @@ -1781,7 +1781,7 @@ _comp_compgen -v addrs split -- "$({ ip -c=never addr show || ip addr show || LC_ALL=C ifconfig -a } 2>/dev/null | - command sed -e 's/[[:space:]]addr:/ /' -ne \ + command gsed -e 's/[[:space:]]addr:/ /' -ne \ "s|.*inet${_n}[[:space:]]\{1,\}\([^[:space:]/]*\).*|\1|p")" || return @@ -1925,17 +1925,17 @@ # This function completes on process IDs. _comp_compgen_pids() { - _comp_compgen_split -- "$(command ps -efo pid | command sed 1d)" + _comp_compgen_split -- "$(command ps -efo pid | command gsed 1d)" } _comp_compgen_pgids() { - _comp_compgen_split -- "$(command ps -efo pgid | command sed 1d)" + _comp_compgen_split -- "$(command ps -efo pgid | command gsed 1d)" } _comp_compgen_pnames() { _comp_compgen_split -X '' -- "$(command ps -efo comm | - command sed -e 1d -e 's:.*/::' -e 's/^-//' | sort -u)" + command gsed -e 1d -e 's:.*/::' -e 's/^-//' | sort -u)" } else _comp_compgen_pids() @@ -1951,7 +1951,7 @@ { local -a procs=() if [[ ${1-} == -s ]]; then - _comp_split procs "$(command ps ax -o comm | command sed -e 1d)" + _comp_split procs "$(command ps ax -o comm | command gsed -e 1d)" else # Some versions of ps don't support "command", but do "comm", e.g. # some busybox ones. Fall back @@ -2093,7 +2093,7 @@ else local sysvdirs _comp_sysvdirs || return 1 - _comp_compgen_split -l -- "$(command sed -e 'y/|/ /' \ + _comp_compgen_split -l -- "$(command gsed -e 'y/|/ /' \ -ne 's/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\2/p' \ "${sysvdirs[0]}/${prev##*/}" 2>/dev/null) start stop" fi @@ -2123,7 +2123,7 @@ { local _modpath=/lib/modules/$1 _comp_compgen_split -- "$(command ls -RL "$_modpath" 2>/dev/null | - command sed -ne 's/^\(.*\)\.k\{0,1\}o\(\.[gx]z\)\{0,1\}$/\1/p' \ + command gsed -ne 's/^\(.*\)\.k\{0,1\}o\(\.[gx]z\)\{0,1\}$/\1/p' \ -e 's/^\(.*\)\.ko\.zst$/\1/p')" } @@ -2446,7 +2446,7 @@ _comp_compgen_terms() { _comp_compgen_split -- "$({ - command sed -ne 's/^\([^[:space:]#|]\{2,\}\)|.*/\1/p' /etc/termcap + command gsed -ne 's/^\([^[:space:]#|]\{2,\}\)|.*/\1/p' /etc/termcap { toe -a || toe } | _comp_awk '{ print $1 }' @@ -2461,7 +2461,7 @@ { if type unbuffer &>/dev/null; then unbuffer -p "$@" - elif script --version 2>&1 | command grep -qF util-linux; then + elif script --version 2>&1 | command ggrep -qF util-linux; then # BSD and Solaris "script" do not seem to have required features script -qaefc "$*" /dev/null else @@ -2542,7 +2542,7 @@ # https://github.com/openssh/openssh-portable/blob/5ec5504f1d328d5bfa64280cd617c3efec4f78f3/readconf.c#L2240 local max_depth=16 while ((${#included[@]} > 0 && depth++ < max_depth)); do - _comp_split include_files "$(command sed -ne 's/^[[:blank:]]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][[:blank:]]\(.*\)$/\1/p' "${included[@]}")" || return + _comp_split include_files "$(command gsed -ne 's/^[[:blank:]]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][[:blank:]]\(.*\)$/\1/p' "${included[@]}")" || return included=() for i in "${include_files[@]}"; do if [[ $i != [~/]* ]]; then @@ -2740,7 +2740,7 @@ # append any available aliases from ssh config files if [[ ${#config[@]} -gt 0 && $aliases ]]; then local -a hosts - if _comp_split hosts "$(command sed -ne 's/^[[:blank:]]*[Hh][Oo][Ss][Tt][[:blank:]=]\{1,\}\(.*\)$/\1/p' "${config[@]}")"; then + if _comp_split hosts "$(command gsed -ne 's/^[[:blank:]]*[Hh][Oo][Ss][Tt][[:blank:]=]\{1,\}\(.*\)$/\1/p' "${config[@]}")"; then _comp_compgen -av known_hosts -- -P "$prefix" \ -S "$suffix" -W '"${hosts[@]%%[*?%]*}"' -X '@(\!*|)' fi @@ -3049,7 +3049,7 @@ return ;; --+([-a-z0-9_])) - local argtype=$(LC_ALL=C $1 --help 2>&1 | command sed -ne \ + local argtype=$(LC_ALL=C $1 --help 2>&1 | command gsed -ne \ "s|.*$prev\[\{0,1\}=[<[]\{0,1\}\([-A-Za-z0-9_]\{1,\}\).*|\1|p") case ${argtype,,} in *dir*) @@ -3084,9 +3084,9 @@ complete -F _comp_complete_longopt \ a2ps awk base64 bash bc bison cat chroot colordiff cp \ csplit cut date df diff dir du enscript expand fmt fold gperf \ - grep grub head irb ld ldd less ln ls m4 mkdir mkfifo mknod \ + ggrep grub head irb ld ldd less ln ls m4 mkdir mkfifo mknod \ mv netstat nl nm objcopy objdump od paste pr ptx readelf rm rmdir \ - sed seq shar sort split strip sum tac tail tee \ + gsed seq shar sort split strip sum tac tail tee \ texindex touch tr uname unexpand uniq units vdir wc who # @since 2.12 --- bash-completion-2.16.0/completions/_adb.orig +++ bash-completion-2.16.0/completions/_adb @@ -6,7 +6,7 @@ _comp_cmd_adb__command_usage() { _comp_compgen_help - <<<"$("$1" help 2>&1 | - command sed -e "/^ *\(adb \)\{0,1\} *$2 /!d;s/[]|[]/\n/g")" + command gsed -e "/^ *\(adb \)\{0,1\} *$2 /!d;s/[]|[]/\n/g")" } _comp_cmd_adb() @@ -57,7 +57,7 @@ ;; forward) _comp_compgen_help - <<<"$("$1" help 2>&1 | - command sed -ne "s/^ *adb *forward *-/-/p")" + command gsed -ne "s/^ *adb *forward *-/-/p")" ;; reboot) _comp_compgen -- -W 'bootloader recovery' --- bash-completion-2.16.0/completions/_mock.orig +++ bash-completion-2.16.0/completions/_mock @@ -47,7 +47,7 @@ # (e.g. ix86 chroot builds in x86_64 mock host) # This would actually depend on what the target root # can be used to build for... - _comp_compgen_split -- "$(command rpm --showrc | command sed -ne \ + _comp_compgen_split -- "$(command rpm --showrc | command gsed -ne \ "s/^[[:space:]]*${regex_header}[[:space:]]*:[[:space:]]*\(.*\)/\1/p")" return ;; --- bash-completion-2.16.0/completions/_modprobe.orig +++ bash-completion-2.16.0/completions/_modprobe @@ -93,7 +93,7 @@ prev=${cur%%=*} cur=${cur#*=} if PATH="$PATH:/sbin" modinfo -p "$module" 2>/dev/null | - command grep -q "^$prev:.*(bool)"; then + command ggrep -q "^$prev:.*(bool)"; then local choices="on off" [[ $cur ]] && choices="1 0 y Y n N on off" _comp_compgen -- -W "$choices" --- bash-completion-2.16.0/completions/_modules.orig +++ bash-completion-2.16.0/completions/_modules @@ -23,13 +23,13 @@ _comp_cmd_module__compgen_list() { - local modules="$(command sed 's/:/ /g' <<<"$LOADEDMODULES" | sort)" + local modules="$(command gsed 's/:/ /g' <<<"$LOADEDMODULES" | sort)" _comp_compgen -- -W "$modules" } _comp_cmd_module__compgen_path() { - local modules="$(command sed 's/:/ /g' <<<"$MODULEPATH" | sort)" + local modules="$(command gsed 's/:/ /g' <<<"$MODULEPATH" | sort)" _comp_compgen -- -W "$modules" } @@ -37,8 +37,8 @@ { local modules="$( module avail 2>&1 | - command grep -E -v '^(-|$)' | - xargs printf '%s\n' | command sed -e 's/(default)//g' | sort + command ggrep -E -v '^(-|$)' | + xargs printf '%s\n' | command gsed -e 's/(default)//g' | sort )" _comp_compgen -- -W "$modules" } @@ -53,8 +53,8 @@ # First parameter on line -- we expect it to be a mode selection local options - options="$(module help 2>&1 | command grep -E '^[[:space:]]*\+' | - _comp_awk '{print $2}' | command sed -e 's/|/ /g' | sort)" + options="$(module help 2>&1 | command ggrep -E '^[[:space:]]*\+' | + _comp_awk '{print $2}' | command gsed -e 's/|/ /g' | sort)" _comp_compgen -- -W "$options" --- bash-completion-2.16.0/completions/_mount.orig +++ bash-completion-2.16.0/completions/_mount @@ -46,8 +46,8 @@ if [[ $host ]]; then _comp_compgen -c "${cur#//"$host"}" split -P "//$host" -- "$( smbclient -d 0 -NL "$host" 2>/dev/null | - command sed -ne '/^[[:blank:]]*Sharename/,/^$/p' | - command sed -ne '3,$s|^[^A-Za-z]*\([^[:blank:]]*\).*$|/\1|p' + command gsed -ne '/^[[:blank:]]*Sharename/,/^$/p' | + command gsed -ne '3,$s|^[^A-Za-z]*\([^[:blank:]]*\).*$|/\1|p' )" fi elif [[ -r /etc/vfstab ]]; then --- bash-completion-2.16.0/completions/_mount.linux.orig +++ bash-completion-2.16.0/completions/_mount.linux @@ -238,8 +238,8 @@ if [[ $host ]]; then _comp_compgen -c "${cur#//"$host"}" split -P "//$host" -- "$( smbclient -d 0 -NL "$host" 2>/dev/null | - command sed -ne '/^[[:blank:]]*Sharename/,/^$/p' | - command sed -ne '3,$s|^[^A-Za-z]*\([^[:blank:]]*\).*$|/\1|p' + command gsed -ne '/^[[:blank:]]*Sharename/,/^$/p' | + command gsed -ne '3,$s|^[^A-Za-z]*\([^[:blank:]]*\).*$|/\1|p' )" fi fi --- bash-completion-2.16.0/completions/_nox.orig +++ bash-completion-2.16.0/completions/_nox @@ -4,7 +4,7 @@ # This serves as a fallback in case the completion is not installed otherwise. eval -- "$( - pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/[^/]*$,,') + pathcmd=$(type -P -- "$1" 2>/dev/null | command gsed 's,/[^/]*$,,') [[ $pathcmd ]] && PATH=$pathcmd${PATH:+:$PATH} register-python-argcomplete --shell bash "$1" 2>/dev/null || register-python-argcomplete3 --shell bash "$1" 2>/dev/null --- bash-completion-2.16.0/completions/_yum.orig +++ bash-completion-2.16.0/completions/_yum @@ -9,12 +9,12 @@ # Try to strip in between headings like "Available Packages" # This will obviously only work for English :P _comp_split COMPREPLY "$(yum -d 0 -C list "$1" "$cur*" 2>/dev/null | - command sed -ne '/^Available /d' -e '/^Installed /d' \ + command gsed -ne '/^Available /d' -e '/^Installed /d' \ -e '/^Updated /d' -e 's/[[:space:]].*//p')" else # Drop first line (e.g. "Updated Packages") _comp_split COMPREPLY "$(yum -d 0 -C list "$1" "$cur*" 2>/dev/null | - command sed -ne 1d -e 's/[[:space:]].*//p')" + command gsed -ne 1d -e 's/[[:space:]].*//p')" fi } @@ -25,7 +25,7 @@ # Drop first ("repo id repo name") and last ("repolist: ...") rows _comp_compgen_split -- "$( yum --noplugins -C repolist "$1" 2>/dev/null | - command sed -ne '/^repo[[:space:]]\{1,\}id/d' -e '/^repolist:/d' \ + command gsed -ne '/^repo[[:space:]]\{1,\}id/d' -e '/^repolist:/d' \ -e 's/[[:space:]].*//p' )" } @@ -36,7 +36,7 @@ _comp_expand_glob files '/usr/lib/yum-plugins/*.py{,c,o}' || return _comp_compgen -U files split -- "$( printf '%s\n' "${files[@]}" | - command sed -ne 's|.*/\([^./]*\)\.py[co]\{0,1\}$|\1|p' | sort -u + command gsed -ne 's|.*/\([^./]*\)\.py[co]\{0,1\}$|\1|p' | sort -u )" } --- bash-completion-2.16.0/completions/2to3.orig +++ bash-completion-2.16.0/completions/2to3 @@ -11,7 +11,7 @@ ;; -f | --fix | -x | --nofix) _comp_compgen_split -- "$( - "$1" --list-fixes 2>/dev/null | command sed -e 1d + "$1" --list-fixes 2>/dev/null | command gsed -e 1d )" return ;; --- bash-completion-2.16.0/completions/7z.orig +++ bash-completion-2.16.0/completions/7z @@ -102,7 +102,7 @@ else if [[ ${words[1]} == d ]]; then _comp_compgen_split -l -- "$( - "$1" l "${words[2]}" -slt 2>/dev/null | command sed -n \ + "$1" l "${words[2]}" -slt 2>/dev/null | command gsed -n \ '/^Path =/s/^Path = \(.*\)$/\1/p' 2>/dev/null | tail -n+2 )" compopt -o filenames --- bash-completion-2.16.0/completions/abook.orig +++ bash-completion-2.16.0/completions/abook @@ -23,11 +23,11 @@ case $prev in --informat) _comp_compgen_split -- "$("$1" --formats | - command sed -n -e 's/^'$'\t''\([a-z]*\).*/\1/p' -e '/^$/q')" + command gsed -n -e 's/^'$'\t''\([a-z]*\).*/\1/p' -e '/^$/q')" ;; --outformat) _comp_compgen_split -- "$("$1" --formats | - command sed -n -e '/^$/,$s/^'$'\t''\([a-z]*\).*/\1/p')" + command gsed -n -e '/^$/,$s/^'$'\t''\([a-z]*\).*/\1/p')" ;; --infile) _comp_compgen -- -W stdin --- bash-completion-2.16.0/completions/alias.orig +++ bash-completion-2.16.0/completions/alias @@ -13,7 +13,7 @@ _comp_compgen -- -A alias ;; *=) - COMPREPLY=("$(alias "${cur%=}" 2>/dev/null | command sed \ + COMPREPLY=("$(alias "${cur%=}" 2>/dev/null | command gsed \ -e 's|^alias '"$cur"'\(.*\)$|\1|')") ;; esac --- bash-completion-2.16.0/completions/appdata-validate.orig +++ bash-completion-2.16.0/completions/appdata-validate @@ -10,7 +10,7 @@ return ;; --output-format) - _comp_compgen_split -- "$("$1" --help | command sed -ne \ + _comp_compgen_split -- "$("$1" --help | command gsed -ne \ 's/--output-format.*\[\(.*\)\]/\1/' -e 's/|/ /gp')" return ;; --- bash-completion-2.16.0/completions/apt-get.orig +++ bash-completion-2.16.0/completions/apt-get @@ -80,7 +80,7 @@ # Prefer `apt-cache` in the same dir as command local pathcmd pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH - _comp_compgen_split -- "$(apt-cache policy | command sed -ne \ + _comp_compgen_split -- "$(apt-cache policy | command gsed -ne \ 's/^ *release.*[ ,]o=\(Debian\|Ubuntu\),a=\(\w*\).*/\2/p')" return ;; --- bash-completion-2.16.0/completions/aptitude.orig +++ bash-completion-2.16.0/completions/aptitude @@ -53,13 +53,13 @@ ;; --target-release | --default-release | -${noargopts}t) _comp_compgen_split -l -- "$(apt-cache policy | - command sed -ne 's/.*release.o=Debian,a=\([_[:alnum:]]*\).*/\1/p')" + command gsed -ne 's/.*release.o=Debian,a=\([_[:alnum:]]*\).*/\1/p')" return ;; esac if [[ $cur == -* ]]; then - _comp_compgen -R help - <<<"$("$1" --help 2>&1 | command sed -e \ + _comp_compgen -R help - <<<"$("$1" --help 2>&1 | command gsed -e \ 's/--with(out)-recommends/--without-recommends\n--with-recommends/')" ((${#COMPREPLY[@]})) || return 0 --- bash-completion-2.16.0/completions/arp.orig +++ bash-completion-2.16.0/completions/arp @@ -37,7 +37,7 @@ _comp_count_args -a "@(--device|--protocol|--file|--hw-type|-${noargopts}[iApfHt])" case $REPLY in 1) - local ips=$("$1" -an | command sed -ne \ + local ips=$("$1" -an | command gsed -ne \ 's/.*(\([0-9]\{1,3\}\(\.[0-9]\{1,3\}\)\{3\}\)).*/\1/p') _comp_compgen -- -W '$ips' ;; --- bash-completion-2.16.0/completions/beadm.orig +++ bash-completion-2.16.0/completions/beadm @@ -138,7 +138,7 @@ # entered BE name, so find snapshot for the particuler BE if [[ "${prev}" != "rollback" ]] then - be_and_snapshots=( $(for K in echo "${!be_and_snapshots[@]}"; do echo ${be_and_snapshots[$K]} | grep "^${prev}@" | sed -e 's,.*@,,'; done) ) + be_and_snapshots=( $(for K in echo "${!be_and_snapshots[@]}"; do echo ${be_and_snapshots[$K]} | ggrep "^${prev}@" | gsed -e 's,.*@,,'; done) ) fi ;; esac @@ -188,7 +188,7 @@ local pprev="${COMP_WORDS[COMP_CWORD-2]}" local realcur="${cur##*=}" local zfsprop="${pprev%%@*}"; zfsprop="${zfsprop##*,}" - local zfsvals=( $(zfs get 2>&1 | nawk '$1 == "'${zfsprop}'" && $2 == "YES" { $1=""; $2=""; $3=""; print }' | sed -e 's,|,,g') ) + local zfsvals=( $(zfs get 2>&1 | nawk '$1 == "'${zfsprop}'" && $2 == "YES" { $1=""; $2=""; $3=""; print }' | gsed -e 's,|,,g') ) compopt -o nospace compopt -o nosort COMPREPLY=( $(compgen -W "${zfsvals[*]}" -- "${realcur}") ) @@ -206,7 +206,7 @@ # ZFS property values local realcur=${cur##*=} local zfsprop=${prev%%@*}; zfsprop=${zfsprop##*,} - local zfsvals=( $(zfs get 2>&1 | nawk '$1 == "'${zfsprop}'" && $2 == "YES" { $1=""; $2=""; $3=""; print }' | sed -e 's,|,,g') ) + local zfsvals=( $(zfs get 2>&1 | nawk '$1 == "'${zfsprop}'" && $2 == "YES" { $1=""; $2=""; $3=""; print }' | gsed -e 's,|,,g') ) compopt -o nospace compopt -o nosort COMPREPLY=( $(compgen -W "${zfsvals[*]}" -- "${realcur}") ) --- bash-completion-2.16.0/completions/carton.orig +++ bash-completion-2.16.0/completions/carton @@ -3,7 +3,7 @@ _comp_cmd_carton__commands() { local cmds=$("$1" usage 2>&1 | - command sed -ne '/.*command.* is one of/{n;p;q;}') + command gsed -ne '/.*command.* is one of/{n;p;q;}') _comp_compgen -aF $' \t\n,' -- -W "$cmds" } --- bash-completion-2.16.0/completions/ccze.orig +++ bash-completion-2.16.0/completions/ccze @@ -30,7 +30,7 @@ ;; --plugin | -${noargopts}p) _comp_compgen_split -- "$("$1" --list-plugins | command \ - sed -ne 's/^\([a-z0-9]\{1,\}\)[[:space:]]\{1,\}|.*/\1/p')" + gsed -ne 's/^\([a-z0-9]\{1,\}\)[[:space:]]\{1,\}|.*/\1/p')" return ;; esac --- bash-completion-2.16.0/completions/cfrun.orig +++ bash-completion-2.16.0/completions/cfrun @@ -33,7 +33,7 @@ done [[ ! -f $hostfile ]] && return - _comp_compgen_split -- "$(command grep -v -E '(=|^$|^#)' \ + _comp_compgen_split -- "$(command ggrep -v -E '(=|^$|^#)' \ "$hostfile")" fi ;; --- bash-completion-2.16.0/completions/checksec.orig +++ bash-completion-2.16.0/completions/checksec @@ -27,11 +27,11 @@ ;; --format) _comp_compgen_split -- "$("$1" --help 2>/dev/null | - command sed -ne 's/[{,}]/ /g;s/^[[:space:]]*--format=//p')" + command gsed -ne 's/[{,}]/ /g;s/^[[:space:]]*--format=//p')" ;; --output) _comp_compgen_split -- "$("$1" --help 2>/dev/null | - command sed -ne 's/[{,}]/ /g;s/^[[:space:]]*--output=//p')" + command gsed -ne 's/[{,}]/ /g;s/^[[:space:]]*--output=//p')" ;; esac --- bash-completion-2.16.0/completions/complete.orig +++ bash-completion-2.16.0/completions/complete @@ -29,7 +29,7 @@ return ;; -*p | -*r) - _comp_compgen_split -l -- "$(complete -p | command sed -e 's|.* ||')" + _comp_compgen_split -l -- "$(complete -p | command gsed -e 's|.* ||')" return ;; esac --- bash-completion-2.16.0/completions/configure.orig +++ bash-completion-2.16.0/completions/configure @@ -33,7 +33,7 @@ if [[ ${BASH_COMPLETION_CMD_CONFIGURE_HINTS-} ]]; then _comp_compgen_split -- "$("$1" --help 2>&1 | _comp_awk '/^ --[A-Za-z]/ { print $1; \ - if ($2 ~ /--[A-Za-z]/) print $2 }' | command sed -e 's/[[,].*//g')" + if ($2 ~ /--[A-Za-z]/) print $2 }' | command gsed -e 's/[[,].*//g')" [[ ${COMPREPLY-} == *=* ]] && compopt -o nospace else _comp_compgen_help --- bash-completion-2.16.0/completions/cpan2dist.orig +++ bash-completion-2.16.0/completions/cpan2dist @@ -29,7 +29,7 @@ done [[ $packagelist ]] && _comp_split COMPREPLY "$(zgrep "^${cur//-/::}" \ "$packagelist" 2>/dev/null | _comp_awk '{print $1}' | - command sed -e 's/::/-/g')" + command gsed -e 's/::/-/g')" fi } && complete -F _comp_cmd_cpan2dist -o default cpan2dist --- bash-completion-2.16.0/completions/curl.orig +++ bash-completion-2.16.0/completions/curl @@ -80,7 +80,7 @@ --engine) local engines=$( "$1" --engine list 2>/dev/null | - command grep "^[[:space:]]" + command ggrep "^[[:space:]]" ) _comp_compgen -- -W '$engines list' return @@ -129,7 +129,7 @@ return ;; --proto-default) - _comp_compgen_split "$("$1" --version 2>/dev/null | command sed -e '/Protocols/!d' -e 's/Protocols://')" + _comp_compgen_split "$("$1" --version 2>/dev/null | command gsed -e '/Protocols/!d' -e 's/Protocols://')" ;; --pubkey) _comp_compgen -x ssh identityfile pub --- bash-completion-2.16.0/completions/cvs.orig +++ bash-completion-2.16.0/completions/cvs @@ -262,7 +262,7 @@ # far, but other changes (something other than # changed/removed/new) may be missing. _comp_compgen -a split -- "$(cvs -q diff --brief 2>&1 | - command sed -ne ' + command gsed -ne ' # changed s/^Files [^ ]* and \([^ ]*\) differ$/\1/p # new/removed --- bash-completion-2.16.0/completions/dict.orig +++ bash-completion-2.16.0/completions/dict @@ -4,7 +4,7 @@ { # shellcheck disable=SC2086 _comp_compgen_split -- "$( - "$@" 2>/dev/null | command sed -ne \ + "$@" 2>/dev/null | command gsed -ne \ 's/^[[:blank:]]\{1,\}\([^[:blank:]]*\).*$/\1/p' )" } @@ -56,11 +56,11 @@ local dictfile=/usr/share/dict/words if [[ -r $dictfile ]]; then # Dictfile may be too large for practical compgen -W usage, so narrow - # it down with grep if $cur looks like something that's safe to embed + # it down with ggrep if $cur looks like something that's safe to embed # in a pattern instead. if [[ $cur == +([-A-Za-z0-9/.]) ]]; then _comp_compgen_split -- "$( - command grep "^${cur//./\\.}" "$dictfile" + command ggrep "^${cur//./\\.}" "$dictfile" )" else _comp_compgen_split -- "$(cat "$dictfile")" --- bash-completion-2.16.0/completions/dladm.orig +++ bash-completion-2.16.0/completions/dladm @@ -14,7 +14,7 @@ COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) ) elif [[ ${prev} =~ "-z" ]]; then # Some illumos OS distributions have zone-aware dladm. Treat -z as a zone name option - local zones="$(zoneadm list -c | grep -v '^global$')" + local zones="$(zoneadm list -c | ggrep -v '^global$')" COMPREPLY=( $(compgen -W "${zones}" -- ${cur}) ) elif [[ ${prev} =~ 'delete-vnic' ]]; then # Redirect stderr to /dev/null not to polute console, e.g.: --- bash-completion-2.16.0/completions/dmypy.orig +++ bash-completion-2.16.0/completions/dmypy @@ -38,8 +38,8 @@ if [[ ! $has_cmd ]]; then local cmds=$("$1" --help 2>&1 | - command sed -ne '/positional arguments/{p;n;p;q;}' | - command sed -ne 's/{\(.*\)}/\1/p') + command gsed -ne '/positional arguments/{p;n;p;q;}' | + command gsed -ne 's/{\(.*\)}/\1/p') _comp_compgen -F , -- -W '$cmds' return fi --- bash-completion-2.16.0/completions/dnssec-keygen.orig +++ bash-completion-2.16.0/completions/dnssec-keygen @@ -3,9 +3,9 @@ _comp_cmd_dnssec_keygen__optarg() { local args=$("$1" -h 2>&1 | - command sed -e 's/|/ /g' -e 's/(.*//' \ + command gsed -e 's/|/ /g' -e 's/(.*//' \ -ne '/^[[:space:]]*'"$2"'/,/^[[:space:]]*[(-]/p' | - command sed -e 's/^[[:space:]]*'"$2"'.*://' -e '/^[[:space:]]*-/d') + command gsed -e 's/^[[:space:]]*'"$2"'.*://' -e '/^[[:space:]]*-/d') _comp_compgen -a -- -W '$args' } --- bash-completion-2.16.0/completions/dot.orig +++ bash-completion-2.16.0/completions/dot @@ -14,14 +14,14 @@ -T*) # generate langs _comp_compgen -c "${cur#-T}" split -P "-T" -- "$( - "$1" -TNON_EXISTENT 2>&1 | command sed -ne 's/.*one of://p' + "$1" -TNON_EXISTENT 2>&1 | command gsed -ne 's/.*one of://p' )" return ;; -K*) # generate layouts _comp_compgen -c "${cur#-K}" split -P "-K" -- "$( - "$1" -KNON_EXISTENT 2>&1 | command sed -ne 's/.*one of://p' + "$1" -KNON_EXISTENT 2>&1 | command gsed -ne 's/.*one of://p' )" return ;; --- bash-completion-2.16.0/completions/ebtables.orig +++ bash-completion-2.16.0/completions/ebtables @@ -18,7 +18,7 @@ -${noargopts}[AIDPFXLZ]) _comp_compgen_split -- "$( "$1" ${table:+-t "$table"} -L 2>/dev/null | - command sed -ne "$chain" + command gsed -ne "$chain" )" ;; -${noargopts}t) @@ -28,17 +28,17 @@ if [[ $table == "filter" || ! $table ]]; then _comp_compgen -- -W '$targets' _comp_compgen -a split -- "$("$1" ${table:+-t "$table"} -L \ - 2>/dev/null | command sed -n -e \ + 2>/dev/null | command gsed -n -e \ "s/INPUT\|OUTPUT\|FORWARD//" -e "$chain")" elif [[ $table == "nat" ]]; then _comp_compgen -- -W '$targets' _comp_compgen -a split -- "$("$1" -t "$table" -L 2>/dev/null | - command sed -n -e "s/OUTPUT|PREROUTING|POSTROUTING//" \ + command gsed -n -e "s/OUTPUT|PREROUTING|POSTROUTING//" \ -e "$chain")" elif [[ $table == "broute" ]]; then _comp_compgen -- -W 'ACCEPT DROP' _comp_compgen -a split -- "$("$1" -t "$table" -L 2>/dev/null | - command sed -n -e "s/BROUTING//" -e "$chain")" + command gsed -n -e "s/BROUTING//" -e "$chain")" fi ;; *) --- bash-completion-2.16.0/completions/fbgs.orig +++ bash-completion-2.16.0/completions/fbgs @@ -11,7 +11,7 @@ return ;; -m | --mode) - _comp_compgen_split -- "$(command sed \ + _comp_compgen_split -- "$(command gsed \ -n '/^mode/{s/^mode \{1,\}"\([^"]\{1,\}\)"/\1/g;p}' \ /etc/fb.modes 2>/dev/null)" return --- bash-completion-2.16.0/completions/fbi.orig +++ bash-completion-2.16.0/completions/fbi @@ -19,7 +19,7 @@ return ;; -m | --mode) - _comp_compgen_split -- "$(command sed \ + _comp_compgen_split -- "$(command gsed \ -n '/^mode/{s/^mode \{1,\}"\([^"]\{1,\}\)"/\1/g;p}' \ /etc/fb.modes 2>/dev/null)" return --- bash-completion-2.16.0/completions/fio.orig +++ bash-completion-2.16.0/completions/fio @@ -2,7 +2,7 @@ _comp_cmd_fio__compgen_engines() { - _comp_compgen_split -F $'\t\n' -- "$("$1" --enghelp 2>/dev/null | command sed -ne '/^[[:space:]]/p')" + _comp_compgen_split -F $'\t\n' -- "$("$1" --enghelp 2>/dev/null | command gsed -ne '/^[[:space:]]/p')" } _comp_cmd_fio() --- bash-completion-2.16.0/completions/fprintd-enroll.orig +++ bash-completion-2.16.0/completions/fprintd-enroll @@ -15,7 +15,7 @@ # Only -enroll may output a message with valid options in it _comp_compgen_split -- "$( "${1/-verify/-enroll}" --finger no-such-finger 2>&1 | - command sed \ + command gsed \ -e s/,//g -ne 's/^.*Name must be one of \(.*\)/\1/p' )" return --- bash-completion-2.16.0/completions/function.orig +++ bash-completion-2.16.0/completions/function @@ -8,7 +8,7 @@ if ((cword == 1)); then _comp_compgen -- -A function else - local funcdef=$(type -- "${words[1]}" 2>/dev/null | command sed -e 1,2d) + local funcdef=$(type -- "${words[1]}" 2>/dev/null | command gsed -e 1,2d) COMPREPLY=("()${funcdef:+ $funcdef}") fi } && --- bash-completion-2.16.0/completions/gcc.orig +++ bash-completion-2.16.0/completions/gcc @@ -12,7 +12,7 @@ local cc=$("$1" -print-prog-name=cc1 2>/dev/null) [[ $cc ]] || return _comp_compgen_split -- "$("$cc" --help 2>/dev/null | tr '\t' ' ' | - command sed -e '/^ *-/!d' -e 's/ *-\([^][ <>]*\).*/-\1/')" + command gsed -e '/^ *-/!d' -e 's/ *-\([^][ <>]*\).*/-\1/')" [[ ${COMPREPLY-} == *= ]] && compopt -o nospace else _comp_compgen_filedir @@ -62,7 +62,7 @@ local REPLY _comp_realcommand "$1" if [[ $REPLY == *$2* ]] || - "$1" --version 2>/dev/null | command grep -q GCC; then + "$1" --version 2>/dev/null | command ggrep -q GCC; then complete -F _comp_cmd_gcc "$1" else complete -F _comp_complete_minimal "$1" --- bash-completion-2.16.0/completions/gdb.orig +++ bash-completion-2.16.0/completions/gdb @@ -31,7 +31,7 @@ IFS=$' \t\n' find ${path_array[@]+"${path_array[@]}"} . -name . -o \ -type d -prune -o -perm -u+x -print 2>/dev/null | - command sed 's|^.*/||' | sort -u + command gsed 's|^.*/||' | sort -u )" fi elif ((cword == 2)); then --- bash-completion-2.16.0/completions/gnokii.orig +++ bash-completion-2.16.0/completions/gnokii @@ -24,7 +24,7 @@ [[ -f $config_file ]] && break done [[ ! -f $config_file ]] && return - _comp_compgen_split -- "$(command sed -n \ + _comp_compgen_split -- "$(command gsed -n \ 's/^\[phone_\(.*\)\]/\1/p' "$config_file")" return ;; @@ -221,7 +221,7 @@ # these 2 below are allowed in combination with others local main_cmd _comp_split -l main_cmd "$(printf '%s\n' "${all_cmd[@]}" | - command sed -e '/--config/d;/--phone/d;s/[][\(){}|^$*+?.]/\\&/g')" + command gsed -e '/--config/d;/--phone/d;s/[][\(){}|^$*+?.]/\\&/g')" # don't provide main command completions if one is # already on the command line local IFS='|' --- bash-completion-2.16.0/completions/gpg.orig +++ bash-completion-2.16.0/completions/gpg @@ -20,7 +20,7 @@ --nrsign-key | --nrlsign-key | --try-secret-key | -${noargopts}k) # return list of public keys _comp_compgen_split -- "$("$1" --list-keys 2>/dev/null | - command sed -ne \ + command gsed -ne \ 's@^pub.*/\([^ ]*\).*$@\1@p' -ne \ 's@^.*\(<\([^>]*\)>\).*$@\2@p')" return @@ -29,14 +29,14 @@ --export-secret-subkeys | -${noargopts}K) # return list of secret keys _comp_compgen_split -- "$("$1" --list-secret-keys 2>/dev/null | - command sed -ne 's@^.*<\([^>]*\)>.*$@\1@p')" + command gsed -ne 's@^.*<\([^>]*\)>.*$@\1@p')" return ;; --recipient | -${noargopts}r) _comp_compgen_split -- "$("$1" --list-keys 2>/dev/null | - command sed -ne 's@^.*<\([^>]*\)>.*$@\1@p')" + command gsed -ne 's@^.*<\([^>]*\)>.*$@\1@p')" if [[ -e ~/.gnupg/gpg.conf ]]; then - _comp_compgen -a split -- "$(command sed -ne \ + _comp_compgen -a split -- "$(command gsed -ne \ 's@^[ \t]*group[ \t][ \t]*\([^=]*\).*$@\1@p' \ ~/.gnupg/gpg.conf)" fi --- bash-completion-2.16.0/completions/gpg2.orig +++ bash-completion-2.16.0/completions/gpg2 @@ -21,16 +21,16 @@ --locate-keys | --refresh-keys) # return list of public keys _comp_compgen_split -- "$("$1" --list-keys 2>/dev/null | - command sed -ne \ + command gsed -ne \ 's@^pub.*/\([^ ]*\).*$@\1@p' -ne \ 's@^.*\(<\([^>]*\)>\).*$@\2@p')" return ;; --recipient | -${noargopts}r) _comp_compgen_split -- "$("$1" --list-keys 2>/dev/null | - command sed -ne 's@^.*<\([^>]*\)>.*$@\1@p')" + command gsed -ne 's@^.*<\([^>]*\)>.*$@\1@p')" if [[ -e ~/.gnupg/gpg.conf ]]; then - _comp_compgen -a split -- "$(command sed -ne \ + _comp_compgen -a split -- "$(command gsed -ne \ 's@^[ \t]*group[ \t][ \t]*\([^=]*\).*$@\1@p' \ ~/.gnupg/gpg.conf)" fi --- bash-completion-2.16.0/completions/gssdp-discover.orig +++ bash-completion-2.16.0/completions/gssdp-discover @@ -16,7 +16,7 @@ --message-type | -m) [[ $1 == *gssdp-discover ]] || return local types=$("$1" --help 2>&1 | - command sed -ne 's/^.*--message-type=.*(\([^)]*\))$/\1/p') + command gsed -ne 's/^.*--message-type=.*(\([^)]*\))$/\1/p') _comp_compgen -F $' \t\n,' -- -W "$types" return ;; --- bash-completion-2.16.0/completions/iconv.orig +++ bash-completion-2.16.0/completions/iconv @@ -15,7 +15,7 @@ _comp_cmd_iconv__compgen_charsets() { _comp_compgen_split -X ... -- "$("$1" -l | - command sed -e 's@/*$@@' -e 's/[,()]//g')" + command gsed -e 's@/*$@@' -e 's/[,()]//g')" } _comp_cmd_iconv() --- bash-completion-2.16.0/completions/ifstat.orig +++ bash-completion-2.16.0/completions/ifstat @@ -22,8 +22,8 @@ if ! { "$1" --help 2>&1 || : } | - command grep -q -- '-d.*--scan'; then - _comp_compgen_split -- "$("$1" -v | command sed -e 's/[,.]//g' \ + command ggrep -q -- '-d.*--scan'; then + _comp_compgen_split -- "$("$1" -v | command gsed -e 's/[,.]//g' \ -ne 's/^.*drivers://p')" fi return @@ -34,7 +34,7 @@ if ! { "$1" --help 2>&1 || : } | - command grep -q -- '-s.*--noupdate'; then + command ggrep -q -- '-s.*--noupdate'; then _comp_compgen_known_hosts -- "$cur" return fi @@ -45,7 +45,7 @@ ! { "$1" --help 2>&1 || : } | - command grep -q -- '-t.*--interval' || return + command ggrep -q -- '-t.*--interval' || return ;; --extended | -${noargopts}x) # iproute2: parse xstat types --- bash-completion-2.16.0/completions/inotifywait.orig +++ bash-completion-2.16.0/completions/inotifywait @@ -6,7 +6,7 @@ # tab. Word following the tab is event name, others are line # wrapped explanations. _comp_compgen -a split -- "$("$1" --help 2>/dev/null | - command sed -e '/^Events:/,/^[^'$'\t'']/!d' \ + command gsed -e '/^Events:/,/^[^'$'\t'']/!d' \ -ne 's/^'$'\t''\([^ '$'\t'']\{1,\}\)[ '$'\t''].*/\1/p')" } --- bash-completion-2.16.0/completions/invoke-rc.d.orig +++ bash-completion-2.16.0/completions/invoke-rc.d @@ -19,13 +19,13 @@ # generate valid_options _comp_compgen_split -- "$( tr " " "\n" <<<"${words[*]} ${options[*]}" | - command sed -ne "/$(command sed 's/ /\\|/g' <<<"${options[*]}")/p" | + command gsed -ne "/$(command gsed 's/ /\\|/g' <<<"${options[*]}")/p" | sort | uniq -u )" _comp_expand_glob services '"$sysvdir"/!(README*|*.sh|$_comp_backup_glob)' && _comp_compgen -a -- -W '"${services[@]#"$sysvdir"/}"' elif [[ -x $sysvdir/$prev ]]; then - _comp_compgen_split -- "$(command sed -e 'y/|/ /' \ + _comp_compgen_split -- "$(command gsed -e 'y/|/ /' \ -ne 's/^.*Usage:[ ]*[^ ]*[ ]*{*\([^}"]*\).*$/\1/p' \ "$sysvdir/$prev")" else --- bash-completion-2.16.0/completions/ip.orig +++ bash-completion-2.16.0/completions/ip @@ -12,7 +12,7 @@ _comp_split -l unquoted "$( { ${1-ip} -c=never netns list 2>/dev/null || ${1-ip} netns list - } | command sed -e 's/ (.*//' + } | command gsed -e 's/ (.*//' )" # namespace names can have spaces, so we quote all of them if needed local ns quoted=() @@ -29,7 +29,7 @@ _comp_compgen_split -- "$( { ${1-ip} -c=never link help || ${1-ip} link help - } 2>&1 | command sed -e \ + } 2>&1 | command gsed -e \ '/TYPE := /,/}/!d' -e \ 's/.*{//' -e \ 's/}.*//' -e \ @@ -42,7 +42,7 @@ _comp_compgen_split -- "$( { ${1-ip} -c=never neigh help || ${1-ip} neigh help - } 2>&1 | command sed -e \ + } 2>&1 | command gsed -e \ '/STATE := /,/}/!d' -e \ 's/.*{//' -e \ 's/}.*//' -e \ @@ -93,7 +93,7 @@ ((cword == 1)) && printf '%s\n' -force { "$1" -c=never help || "$1" help - } 2>&1 | command sed -e \ + } 2>&1 | command gsed -e \ 's/[{|}=]/\n/g' -e \ 's/\[\([^]]\{1,\}\)\]/\1/g' )" @@ -102,7 +102,7 @@ _comp_compgen_split -- "help $( { "$1" -c=never help || "$1" help - } 2>&1 | command sed -e \ + } 2>&1 | command gsed -e \ '/OBJECT := /,/}/!d' -e \ 's/.*{//' -e \ 's/}.*//' -e \ @@ -304,7 +304,7 @@ _comp_compgen_split -- "$( { "$1" -c=never r 2>/dev/null || "$1" r - } | command sed -ne \ + } | command gsed -ne \ 's/.*via \([0-9.]*\).*/\1/p' )" elif [[ $prev == "$subcmd" ]]; then @@ -375,7 +375,7 @@ _comp_compgen -- -W "$( # stats command was added after color, should always have it "$1" -c=never stats help 2>&1 | - command sed -e \ + command gsed -e \ '/^GROUP := /,/}/!d' -e \ 's/^GROUP := //g' -e \ '/:=/d' -e \ @@ -464,7 +464,7 @@ _comp_compgen_split -- "$( { ip -c=never ntable show 2>/dev/null || ip ntable show - } | command sed -ne 's/^inet6\{0,1\} //p' + } | command gsed -ne 's/^inet6\{0,1\} //p' )" ;; *) @@ -533,7 +533,7 @@ _comp_compgen_split -- "help all $( { "$1" -c=never monitor help || "$1" monitor help - } 2>&1 | command sed -e \ + } 2>&1 | command gsed -e \ '/OBJECTS := /,/[^|]$/!d' -e \ 's/OBJECTS := *//' -e \ 's/|//g' --- bash-completion-2.16.0/completions/iperf.orig +++ bash-completion-2.16.0/completions/iperf @@ -20,8 +20,8 @@ --format | -${noargopts}f) local formats=$( "$1" --help 2>&1 | - command sed -ne 's/^.*--format .*\[\([a-zA-Z]\{1,\}\)\].*/\1/p' | - command sed -e 's/./& /g' + command gsed -ne 's/^.*--format .*\[\([a-zA-Z]\{1,\}\)\].*/\1/p' | + command gsed -e 's/./& /g' ) _comp_compgen -- -W '$formats' return @@ -77,10 +77,10 @@ for i in "${words[@]}"; do case $i in -s | --server) - filter=(command sed -e '/^Client.specific/,/^\(Server.specific.*\)\{0,1\}$/d') + filter=(command gsed -e '/^Client.specific/,/^\(Server.specific.*\)\{0,1\}$/d') ;; -c | --client) - filter=(command sed -e '/^Server.specific/,/^\(Client.specific.*\)\{0,1\}$/d') + filter=(command gsed -e '/^Server.specific/,/^\(Client.specific.*\)\{0,1\}$/d') ;; esac done --- bash-completion-2.16.0/completions/ipmitool.orig +++ bash-completion-2.16.0/completions/ipmitool @@ -3,7 +3,7 @@ _comp_cmd_ipmitool__singleline_help() { _comp_compgen_split -- "$("$1" "$2" 2>&1 | - command sed -ne 's/[,\r]//g' -e 's/^.*[Cc]ommands://p')" + command gsed -ne 's/[,\r]//g' -e 's/^.*[Cc]ommands://p')" } _comp_cmd_ipmitool() @@ -23,7 +23,7 @@ ;; -*I) _comp_compgen_split -- "$("$1" -h 2>&1 | - command sed -e '/^Interfaces:/,/^[[:space:]]*$/!d' \ + command gsed -e '/^Interfaces:/,/^[[:space:]]*$/!d' \ -ne 's/^[[:space:]]\{1,\}\([^[:space:]]\{1,\}\).*/\1/p')" return ;; --- bash-completion-2.16.0/completions/iptables.orig +++ bash-completion-2.16.0/completions/iptables @@ -16,7 +16,7 @@ -*[AIDRPFXLZ]) _comp_compgen_split -- "$( "$1" ${table:+-t "$table"} -nL 2>/dev/null | - command sed -ne 's/^Chain \([^ ]\{1,\}\).*$/\1/p' + command gsed -ne 's/^Chain \([^ ]\{1,\}\).*$/\1/p' )" ;; -*t) @@ -26,24 +26,24 @@ if [[ $table == "filter" || ! $table ]]; then _comp_compgen -- -W '$targets' _comp_compgen -a split -- "$("$1" ${table:+-t "$table"} -nL \ - 2>/dev/null | command sed -ne "$chain" \ + 2>/dev/null | command gsed -ne "$chain" \ -e 's/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//')" elif [[ $table == "nat" ]]; then _comp_compgen -- -W '$targets MIRROR SNAT DNAT MASQUERADE' _comp_compgen -a split -- "$("$1" -t "$table" -nL 2>/dev/null | - command sed -ne "$chain" \ + command gsed -ne "$chain" \ -e 's/OUTPUT|PREROUTING|POSTROUTING//')" elif [[ $table == "mangle" ]]; then _comp_compgen -- -W '$targets MARK TOS' _comp_compgen -a split -- "$("$1" -t "$table" -nL 2>/dev/null | - command sed -ne "$chain" \ + command gsed -ne "$chain" \ -e 's/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//')" fi ;; *) if [[ $cur == -* ]]; then _comp_compgen_help - <<<"$("$1" --help 2>&1 | - command sed -e "s/^\[\!\]//")" + command gsed -e "s/^\[\!\]//")" [[ ${COMPREPLY-} == *= ]] && compopt -o nospace fi ;; --- bash-completion-2.16.0/completions/ipv6calc.orig +++ bash-completion-2.16.0/completions/ipv6calc @@ -12,9 +12,9 @@ return ;; --in | --out | --action | -${noargopts}[IOA]) - # With ipv6calc < 0.73.0, -m does nothing here, so use sed instead. + # With ipv6calc < 0.73.0, -m does nothing here, so use gsed instead. _comp_compgen_split -- "$("$1" "$prev" -h 2>&1 | - command sed -ne 's/^[[:space:]]\{1,\}\([^[:space:]:]\{1,\}\)[[:space:]]*:.*/\1/p')" + command gsed -ne 's/^[[:space:]]\{1,\}\([^[:space:]:]\{1,\}\)[[:space:]]*:.*/\1/p')" return ;; --db-geoip | --db-ip2location-ipv4 | --db-ip2location-ipv6) @@ -30,7 +30,7 @@ if [[ $cur == -* ]]; then _comp_compgen_help - <<<"$("$1" -h 2>&1 | - command sed -e "s/[][]//g")" + command gsed -e "s/[][]//g")" fi } && --- bash-completion-2.16.0/completions/isql.orig +++ bash-completion-2.16.0/completions/isql @@ -8,7 +8,7 @@ [[ -f ${ODBCINI-} ]] && _comp_compgen_split -l -- "$( - command sed -n 's/\]//g;s/^\[//gp' "$ODBCINI" + command gsed -n 's/\]//g;s/^\[//gp' "$ODBCINI" )" } && complete -F _comp_cmd_isql isql --- bash-completion-2.16.0/completions/java.orig +++ bash-completion-2.16.0/completions/java @@ -70,7 +70,7 @@ if [[ $i == *.@(jar|zip) && -r $i ]]; then if type zipinfo &>/dev/null; then _comp_split -a classes "$(zipinfo -1 "$i" "$cur*" 2>/dev/null | - command grep '^[^$]*\.class$')" + command ggrep '^[^$]*\.class$')" elif type unzip &>/dev/null; then # Last column, between entries consisting entirely of dashes _comp_split -a classes "$(unzip -lq "$i" "$cur*" 2>/dev/null | @@ -78,7 +78,7 @@ flag && $NF ~ /^[^$]*\.class/ { print $NF }')" elif type jar &>/dev/null; then _comp_split -a classes "$(jar tf "$i" "$cur" | - command grep '^[^$]*\.class$')" + command ggrep '^[^$]*\.class$')" fi elif [[ -d $i ]]; then @@ -121,13 +121,13 @@ _comp_expand_glob files '"$i/$cur"*' || continue _comp_split -la COMPREPLY "$( command ls -F -d "${files[@]}" 2>/dev/null | - command sed -e 's|^'"$i"'/||' + command gsed -e 's|^'"$i"'/||' )" fi done if ((${#COMPREPLY[@]} != 0)); then # keep only packages with the package suffix `/` being removed - _comp_split -l COMPREPLY "$(printf '%s\n' "${COMPREPLY[@]}" | command sed -n 's,/$,,p')" + _comp_split -l COMPREPLY "$(printf '%s\n' "${COMPREPLY[@]}" | command gsed -n 's,/$,,p')" # convert path syntax to package syntax ((${#COMPREPLY[@]})) && COMPREPLY=("${COMPREPLY[@]//\//.}") fi @@ -318,7 +318,7 @@ # For some reason there may be -g:none AND -g:{lines,source,vars}; # convert the none case to the curly brace format so it parses like # the others. - local opts=$("$1" $helpopt 2>&1 | command sed -e 's/-g:none/-g:{none}/' -ne \ + local opts=$("$1" $helpopt 2>&1 | command gsed -e 's/-g:none/-g:{none}/' -ne \ "s/^[[:space:]]*${cur%%:*}:{\([^}]\{1,\}\)}.*/\1/p") _comp_compgen -c "${cur#*:}" -- -W "${opts//,/ }" return --- bash-completion-2.16.0/completions/lilo.orig +++ bash-completion-2.16.0/completions/lilo @@ -3,7 +3,7 @@ _comp_cmd_lilo__labels() { _comp_compgen_split -- "$(_comp_awk -F = '$1 ~ /^[ \t]*label$/ {print $2}' \ - "${1:-/etc/lilo.conf}" 2>/dev/null | command sed -e 's/\"//g')" + "${1:-/etc/lilo.conf}" 2>/dev/null | command gsed -e 's/\"//g')" } _comp_cmd_lilo() --- bash-completion-2.16.0/completions/links.orig +++ bash-completion-2.16.0/completions/links @@ -28,7 +28,7 @@ ;; -driver) local drivers=$("$1" -driver foo 2>&1 | - command sed -ne '$!d' -e '/^[a-z0-9, ]\{1,\}$/s/,/ /gp') + command gsed -ne '$!d' -e '/^[a-z0-9, ]\{1,\}$/s/,/ /gp') [[ $drivers ]] || drivers='x svgalib fb directfb pmshell atheos' _comp_compgen -- -W "$drivers" return --- bash-completion-2.16.0/completions/lintian.orig +++ bash-completion-2.16.0/completions/lintian @@ -9,7 +9,7 @@ if [[ $cur == *, ]]; then search=${cur//,/ } for item in $search; do - tags=$(command sed -e "s/\<$item\>//g" <<<"$tags") + tags=$(command gsed -e "s/\<$item\>//g" <<<"$tags") done _comp_compgen -aR -- -W "$tags" elif [[ $cur == *,* ]]; then @@ -29,11 +29,11 @@ if [[ $cur == *, ]]; then search=${cur//,/ } for item in $search; do - match=$(command grep -nE "^(Check-Script|Abbrev): $item$" \ + match=$(command ggrep -nE "^(Check-Script|Abbrev): $item$" \ "${check_files[@]}" | cut -d: -f1) todisable=$(_comp_awk '/^(Check-Script|Abbrev)/ { print $2 }' "$match") for name in $todisable; do - checks=$(command sed -e "s/\<$name\>//g" <<<"$checks") + checks=$(command gsed -e "s/\<$name\>//g" <<<"$checks") done done _comp_compgen -aR -- -W "$checks" @@ -54,7 +54,7 @@ if [[ $cur == *, ]]; then search=${cur//,/ } for item in $search; do - infos=$(command sed -e "s/\<$item\>//g" <<<"$infos") + infos=$(command gsed -e "s/\<$item\>//g" <<<"$infos") done _comp_compgen -aR -- -W "$infos" elif [[ $cur == *,* ]]; then --- bash-completion-2.16.0/completions/lvm.orig +++ bash-completion-2.16.0/completions/lvm @@ -8,25 +8,25 @@ _comp_cmd_lvm__volumegroups() { _comp_compgen_split -- "$(vgscan 2>/dev/null | - command sed -n -e 's|.*Found.*"\(.*\)".*$|\1|p')" + command gsed -n -e 's|.*Found.*"\(.*\)".*$|\1|p')" } _comp_cmd_lvm__physicalvolumes_all() { _comp_compgen_split -- "$(pvscan 2>/dev/null | - command sed -n -e 's|^.*PV \([^ ]*\) .*|\1|p')" + command gsed -n -e 's|^.*PV \([^ ]*\) .*|\1|p')" } _comp_cmd_lvm__physicalvolumes() { _comp_compgen_split -- "$(pvscan 2>/dev/null | - command sed -n -e 's|^.*PV \(.*\) VG.*$|\1|p')" + command gsed -n -e 's|^.*PV \(.*\) VG.*$|\1|p')" } _comp_cmd_lvm__logicalvolumes() { _comp_compgen_split -- "$(lvscan 2>/dev/null | - command sed -n -e "s|^.*'\(.*\)'.*$|\1|p")" + command gsed -n -e "s|^.*'\(.*\)'.*$|\1|p")" if [[ $cur == /dev/mapper/* ]]; then _comp_compgen -a filedir local i --- bash-completion-2.16.0/completions/Makefile.in.orig +++ bash-completion-2.16.0/completions/Makefile.in @@ -42,13 +42,13 @@ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + | gsed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + flg=`printf '%s\n' "$$flg" | gsed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ @@ -121,27 +121,27 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | gsed 's|.|.|g'`; am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + $(srcdir)/*) f=`echo "$$p" | gsed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | gsed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` + srcdirstrip=`echo "$(srcdir)" | gsed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" + for p in $$list; do echo "$$p"; done | gsed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + gsed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' + gsed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + gsed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ @@ -1358,7 +1358,7 @@ uninstall-bashcompDATA: @$(NORMAL_UNINSTALL) @list='$(bashcomp_DATA)'; test -n "$(bashcompdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + files=`for p in $$list; do echo $$p; done | gsed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(bashcompdir)'; $(am__uninstall_files_from_dir) tags TAGS: @@ -1370,21 +1370,21 @@ $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + @srcdirstrip=`echo "$(srcdir)" | gsed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | gsed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ + gsed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + gsed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + dir=`echo "/$$file" | gsed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ --- bash-completion-2.16.0/completions/makepkg.orig +++ bash-completion-2.16.0/completions/makepkg @@ -14,7 +14,7 @@ esac if [[ $cur == -* ]]; then - _comp_compgen_help - <<<"$("$1" | command sed -e "s/^options://")" + _comp_compgen_help - <<<"$("$1" | command gsed -e "s/^options://")" return fi --- bash-completion-2.16.0/completions/mcrypt.orig +++ bash-completion-2.16.0/completions/mcrypt @@ -26,7 +26,7 @@ ;; -h | --hash) _comp_compgen_split -- "$("$1" --list-hash 2>/dev/null | - command sed -e 1d)" + command gsed -e 1d)" return ;; -k | -s | --key | --keysize) --- bash-completion-2.16.0/completions/medusa.orig +++ bash-completion-2.16.0/completions/medusa @@ -16,7 +16,7 @@ ;; -*M) _comp_compgen_split -- "$("$1" -d | _comp_awk '/^ +\+/ {print $2}' | - command sed -e 's/\.mod$//')" + command gsed -e 's/\.mod$//')" return ;; esac --- bash-completion-2.16.0/completions/mplayer.orig +++ bash-completion-2.16.0/completions/mplayer @@ -4,8 +4,8 @@ { cur=${cur%\\} _comp_compgen_split -- "$("$1" -noconfig all "$2" help 2>/dev/null | - command sed -e '/^Available/,/^$/!d' -e '/^Available/d' | _comp_awk '{print $1}' | - command sed -e 's/:$//' -e 's/^'"${2#-}"'$//' -e 's/<.*//')" + command gsed -e '/^Available/,/^$/!d' -e '/^Available/d' | _comp_awk '{print $1}' | + command gsed -e 's/:$//' -e 's/^'"${2#-}"'$//' -e 's/<.*//')" } _comp_cmd_mplayer() @@ -54,7 +54,7 @@ ;; -subcp | -msgcharset) local cp - if _comp_split cp "$(iconv --list 2>/dev/null | command sed -e "s@//@@;" 2>/dev/null)"; then + if _comp_split cp "$(iconv --list 2>/dev/null | command gsed -e "s@//@@;" 2>/dev/null)"; then if [[ $cur == "${cur,,}" ]]; then _comp_compgen -- -W '"${cp[@],,}"' else @@ -267,7 +267,7 @@ case $cur in -*) _comp_compgen_split -- "$("$cmd" -noconfig all -list-options 2>/dev/null | - command sed -ne "1,/^[[:space:]]*Name/d" \ + command gsed -ne "1,/^[[:space:]]*Name/d" \ -e "s/^[[:space:]]*/-/" -e "s/[[:space:]:].*//" \ -e "/^-\(Total\|.*\*\)\{0,1\}$/!p")" ;; --- bash-completion-2.16.0/completions/msynctool.orig +++ bash-completion-2.16.0/completions/msynctool @@ -8,22 +8,22 @@ case $words in --configure) _comp_compgen_split -- "$("$1" --showgroup "$prev" | - _comp_awk '/^Member/ {print $2}' | command sed -e 's/:$//')" + _comp_awk '/^Member/ {print $2}' | command gsed -e 's/:$//')" return ;; --addmember) - _comp_compgen_split -- "$("$1" --listplugins | command sed -e 1d)" + _comp_compgen_split -- "$("$1" --listplugins | command gsed -e 1d)" return ;; esac case $prev in --configure | --addgroup | --delgroup | --showgroup | --sync | --addmember) - _comp_compgen_split -- "$("$1" --listgroups | command sed -e 1d)" + _comp_compgen_split -- "$("$1" --listgroups | command gsed -e 1d)" return ;; --showformats | --filter-objtype | --slow-sync) - _comp_compgen_split -- "$("$1" --listobjects | command sed -e 1d)" + _comp_compgen_split -- "$("$1" --listobjects | command gsed -e 1d)" return ;; esac --- bash-completion-2.16.0/completions/mutt.orig +++ bash-completion-2.16.0/completions/mutt @@ -67,7 +67,7 @@ conffiles+=("$1") local -a newconffiles - _comp_split newconffiles "$(command sed -n 's|^source[[:space:]]\{1,\}\([^[:space:]]\{1,\}\).*$|\1|p' "$1")" || + _comp_split newconffiles "$(command gsed -n 's|^source[[:space:]]\{1,\}\([^[:space:]]\{1,\}\).*$|\1|p' "$1")" || return 0 local file REPLY @@ -90,7 +90,7 @@ local REPLY _comp_cmd_mutt__get_conffiles "$muttrc" || return 0 conffiles=("${REPLY[@]}") - _comp_compgen -a split -- "$(command sed -n 's|^alias[[:space:]]\{1,\}\([^[:space:]]\{1,\}\).*$|\1|p' \ + _comp_compgen -a split -- "$(command gsed -n 's|^alias[[:space:]]\{1,\}\([^[:space:]]\{1,\}\).*$|\1|p' \ "${conffiles[@]}")" } @@ -101,7 +101,7 @@ [[ $cur ]] || return 0 local muttcmd=${words[0]} - local querycmd="$("$muttcmd" -Q query_command 2>/dev/null | command sed -e 's|^query_command=\"\(.*\)\"$|\1|' -e 's|%s|'"$cur"'|')" + local querycmd="$("$muttcmd" -Q query_command 2>/dev/null | command gsed -e 's|^query_command=\"\(.*\)\"$|\1|' -e 's|%s|'"$cur"'|')" if [[ $querycmd ]]; then local REPLY _comp_expand_tilde "$querycmd" @@ -109,7 +109,7 @@ # generate queryresults: # $querycmd is expected to be a command with arguments _comp_compgen -a split -- "$($querycmd | - command sed -n '2,$s|^\([^[:space:]]\{1,\}\).*|\1|p')" + command gsed -n '2,$s|^\([^[:space:]]\{1,\}\).*|\1|p')" fi } @@ -120,7 +120,7 @@ _comp_cmd_mutt__get_muttrc muttrc=$REPLY if [[ $cur == [=+]* ]]; then - folder="$("$muttcmd" -F "$muttrc" -Q folder 2>/dev/null | command sed -e 's|^folder=\"\(.*\)\"$|\1|')" + folder="$("$muttcmd" -F "$muttrc" -Q folder 2>/dev/null | command gsed -e 's|^folder=\"\(.*\)\"$|\1|')" [[ $folder ]] || folder=~/Mail # Match any file in $folder beginning with $cur @@ -131,7 +131,7 @@ return elif [[ $cur == !* ]]; then spoolfile="$("$muttcmd" -F "$muttrc" -Q spoolfile 2>/dev/null | - command sed -e 's|^spoolfile=\"\(.*\)\"$|\1|')" + command gsed -e 's|^spoolfile=\"\(.*\)\"$|\1|')" if [[ $spoolfile ]]; then _comp_dequote "\"$spoolfile\"" && spoolfile=$REPLY cur=$spoolfile${cur:1} --- bash-completion-2.16.0/completions/mysql.orig +++ bash-completion-2.16.0/completions/mysql @@ -35,7 +35,7 @@ ;; --database | -${noargopts}D) _comp_compgen_split -- "$(mysqlshow 2>/dev/null | - command sed -ne '2d' -e 's/^|.\([^|]*\)|.*/\1/p')" + command gsed -ne '2d' -e 's/^|.\([^|]*\)|.*/\1/p')" return ;; @@ -102,7 +102,7 @@ esac _comp_compgen_split -- "$(mysqlshow 2>/dev/null | - command sed -ne '2d' -e 's/^|.\([^|]*\)|.*/\1/p')" + command gsed -ne '2d' -e 's/^|.\([^|]*\)|.*/\1/p')" } && complete -F _comp_cmd_mysql mysql --- bash-completion-2.16.0/completions/ncftp.orig +++ bash-completion-2.16.0/completions/ncftp @@ -17,7 +17,7 @@ fi if [[ $cword -eq 1 && -f ~/.ncftp/bookmarks ]]; then - _comp_compgen_split -- "$(command sed -ne \ + _comp_compgen_split -- "$(command gsed -ne \ 's/^\([^,]\{1,\}\),.*$/\1/p' ~/.ncftp/bookmarks)" fi --- bash-completion-2.16.0/completions/nmap.orig +++ bash-completion-2.16.0/completions/nmap @@ -36,7 +36,7 @@ # strip everything following a non-option name or = char # TODO: should expand -T<0-5> to -T0 ... -T5 _comp_compgen_split -- "$( - "$1" --help 2>&1 | command sed \ + "$1" --help 2>&1 | command gsed \ -e "s/:.*$//" \ -e "s/=.*$/=/" \ -e "s/;[[:space:]]*-/ -/g" \ --- bash-completion-2.16.0/completions/openssl.orig +++ bash-completion-2.16.0/completions/openssl @@ -33,8 +33,8 @@ _comp_awk '/^-.*[ \t]to use the .* message digest algorithm/ { print $1 }' )" _comp_compgen -ac "${cur#-}" split -P "-" -- "$("$1" help 2>&1 | - command sed -ne '/^Message Digest commands/,/^[[:space:]]*$/p' | - command sed -e 1d)" + command gsed -ne '/^Message Digest commands/,/^[[:space:]]*$/p' | + command gsed -e 1d)" } _comp_cmd_openssl() @@ -46,7 +46,7 @@ if ((cword == 1)); then local commands - commands="$("$1" help 2>&1 | command sed -e '/commands\|help:/d')" + commands="$("$1" help 2>&1 | command gsed -e '/commands\|help:/d')" _comp_compgen -- -W "$commands" else command=${words[1]} --- bash-completion-2.16.0/completions/pdftotext.orig +++ bash-completion-2.16.0/completions/pdftotext @@ -12,7 +12,7 @@ ;; -enc) _comp_compgen_split -- "$("$1" -listenc 2>/dev/null | - command sed -e 1d)" + command gsed -e 1d)" return ;; -eol) --- bash-completion-2.16.0/completions/perl.orig +++ bash-completion-2.16.0/completions/perl @@ -131,7 +131,7 @@ _comp_cmd_perl__helper "" perldocs if [[ $cur == p* ]]; then _comp_compgen -a split -- "$(PERLDOC_PAGER=cat "$1" -u perl | - command sed -ne '/perl.*Perl overview/,/perlwin32/p' | + command gsed -ne '/perl.*Perl overview/,/perlwin32/p' | _comp_awk 'NF >= 2 && $1 ~ /^perl/ { print $1 }')" fi fi --- bash-completion-2.16.0/completions/pgrep.orig +++ bash-completion-2.16.0/completions/pgrep @@ -38,7 +38,7 @@ --nslist) _comp_compgen -c "${cur##*,}" split -F $' \t\n,' -- "$( "$1" --help 2>&1 | - command sed -ne 's/^[[:space:]]*Available namespaces://p' + command gsed -ne 's/^[[:space:]]*Available namespaces://p' )" && _comp_delimited , -W '"${COMPREPLY[@]}"' return @@ -48,7 +48,7 @@ if [[ $cur == -* ]]; then _comp_compgen_help || _comp_compgen_usage - <<<"$("$1" --usage 2>&1 | - command sed -e "s/\[-signal\]//" -e "s/\[-SIGNAL\]//")" + command gsed -e "s/\[-signal\]//" -e "s/\[-SIGNAL\]//")" [[ $cword -eq 1 && $1 == *pkill ]] && _comp_compgen -a signals - return fi --- bash-completion-2.16.0/completions/pkgadd.orig +++ bash-completion-2.16.0/completions/pkgadd @@ -48,7 +48,7 @@ local REPLY _comp_dequote "$device" _comp_split -l pkginst_list "$(strings "${REPLY-}" | - command sed -n 's/^PKG=//p' | sort -u)" + command gsed -n 's/^PKG=//p' | sort -u)" fi ((${#pkginst_list[@]})) && _comp_compgen -- -W '"${pkginst_list[@]}"' --- bash-completion-2.16.0/completions/pngfix.orig +++ bash-completion-2.16.0/completions/pngfix @@ -15,7 +15,7 @@ ;; --strip) _comp_compgen_split -F '|' -- "$("$1" --help 2>&1 | - command sed -ne 's/.*--strip=\[\([^]]*\)\].*/\1/p')" + command gsed -ne 's/.*--strip=\[\([^]]*\)\].*/\1/p')" return ;; esac --- bash-completion-2.16.0/completions/postcat.orig +++ bash-completion-2.16.0/completions/postcat @@ -23,7 +23,7 @@ done if [[ $qfile ]]; then _comp_compgen_split -- "$(mailq 2>/dev/null | - command sed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* !].*$//')" + command gsed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* !].*$//')" return fi --- bash-completion-2.16.0/completions/postsuper.orig +++ bash-completion-2.16.0/completions/postsuper @@ -12,17 +12,17 @@ ;; -[dr]) _comp_compgen_split -- "ALL $(mailq 2>/dev/null | - command sed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* !].*$//')" + command gsed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* !].*$//')" return ;; -h) _comp_compgen_split -- "ALL $(mailq 2>/dev/null | - command sed \ + command gsed \ -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* ].*$//; /!$/d')" return ;; -H) - _comp_compgen_split -- "ALL $(mailq 2>/dev/null | command sed \ + _comp_compgen_split -- "ALL $(mailq 2>/dev/null | command gsed \ -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; /^[0-9A-Z]*[* ]/d; s/!.*$//')" return ;; --- bash-completion-2.16.0/completions/povray.orig +++ bash-completion-2.16.0/completions/povray @@ -23,7 +23,7 @@ # guess what output file type user may want case $( IFS=$'\n' - command grep '^[-+]F' <<<"${words[*]}" + command ggrep '^[-+]F' <<<"${words[*]}" ) in [-+]FN) oext=png ;; [-+]FP) oext=ppm ;; @@ -48,7 +48,7 @@ cur="${povcur#*\[}" pfx="${povcur%\["$cur"}" # prefix == filename [[ -f $pfx && -r $pfx ]] || return - _comp_compgen_split -l -- "$(command sed -ne \ + _comp_compgen_split -l -- "$(command gsed -ne \ 's/^[[:space:]]*\[\([^]]*\]\).*$/\1/p' -- "$pfx")" && # to prevent [bar] expand to nothing. can be done more easily? _comp_compgen -Rv COMPREPLY -- -P "${pfx}[" -W '"${COMPREPLY[@]}"' --- bash-completion-2.16.0/completions/ps.orig +++ bash-completion-2.16.0/completions/ps @@ -61,7 +61,7 @@ "$1" --help "$1" --help all } 2>/dev/null | - command sed -e "s/, [A-Za-z],/,/")" || + command gsed -e "s/, [A-Za-z],/,/")" || _comp_compgen_usage fi } && --- bash-completion-2.16.0/completions/puppet.orig +++ bash-completion-2.16.0/completions/puppet @@ -24,7 +24,7 @@ if [[ $1 == --all ]]; then cert_list=$( $puppetca --list --all | - command sed -e 's/^[+-]\{0,1\}[[:space:]]*\([^[:space:]]\{1,\}\)[[:space:]]\{1,\}.*$/\1/' + command gsed -e 's/^[+-]\{0,1\}[[:space:]]*\([^[:space:]]\{1,\}\)[[:space:]]\{1,\}.*$/\1/' ) else cert_list=$("$puppetca" --list) @@ -35,7 +35,7 @@ _comp_cmd_puppet__types() { puppet_types=$( - puppet describe --list | command sed -e 's/^\([^[:space:]]\{1,\}\).*$/\1/' + puppet describe --list | command gsed -e 's/^\([^[:space:]]\{1,\}\).*$/\1/' ) _comp_compgen -a -- -W "$puppet_types" } @@ -47,7 +47,7 @@ puppetdoc=puppetdoc puppet_doc_list=$( - $puppetdoc --list | command sed -e 's/^\([^[:space:]]\{1,\}\).*$/\1/' + $puppetdoc --list | command gsed -e 's/^\([^[:space:]]\{1,\}\).*$/\1/' ) _comp_compgen -a -- -W "$puppet_doc_list" } --- bash-completion-2.16.0/completions/pydoc.orig +++ bash-completion-2.16.0/completions/pydoc @@ -16,7 +16,7 @@ esac if [[ $cur == -* ]]; then - _comp_compgen_help - <<<"$("$1" | command sed -e "s/^pydoc3\{0,1\} //")" + _comp_compgen_help - <<<"$("$1" | command gsed -e "s/^pydoc3\{0,1\} //")" return fi @@ -32,7 +32,7 @@ # Note that we don't do "pydoc modules" as it is known to hang on # some systems; _comp_xfunc_python_modules tends to work better and faster. _comp_compgen -a split -- "$("$1" keywords topics | - command sed -e '/^Here/d')" + command gsed -e '/^Here/d')" _comp_compgen -a filedir py } && --- bash-completion-2.16.0/completions/pylint.orig +++ bash-completion-2.16.0/completions/pylint @@ -11,10 +11,10 @@ local msgs="$( set -o pipefail "$1" --list-msgs-enabled 2>/dev/null | - command sed -ne "$filter" | - command sed -ne 's/^[[:space:]]\{1,\}\([a-z-]\{6,\}\).*/\1/p' || + command gsed -ne "$filter" | + command gsed -ne 's/^[[:space:]]\{1,\}\([a-z-]\{6,\}\).*/\1/p' || "$1" --list-msgs 2>/dev/null | - command sed -ne 's/^:\([a-z-]\{6,\}\).*/\1/p' + command gsed -ne 's/^:\([a-z-]\{6,\}\).*/\1/p' )" _comp_delimited , -W "$msgs" } --- bash-completion-2.16.0/completions/pytest.orig +++ bash-completion-2.16.0/completions/pytest @@ -3,7 +3,7 @@ _comp_cmd_pytest__option_choice_args() { local modes=$("$1" "$2=bash-completion-nonexistent" 2>&1 | - command sed -e 's/[^[:space:][:alnum:]_-]\{1,\}//g' \ + command gsed -e 's/[^[:space:][:alnum:]_-]\{1,\}//g' \ -ne 's/.*choose from //p') _comp_compgen -a -- -W '$modes' } --- bash-completion-2.16.0/completions/qdbus.orig +++ bash-completion-2.16.0/completions/qdbus @@ -6,7 +6,7 @@ _comp_initialize -- "$@" || return _comp_compgen_split -- "$( - command "${words[@]::cword}" 2>/dev/null | command sed 's/(.*)//' + command "${words[@]::cword}" 2>/dev/null | command gsed 's/(.*)//' )" } && complete -F _comp_cmd_qdbus qdbus dcop --- bash-completion-2.16.0/completions/reportbug.orig +++ bash-completion-2.16.0/completions/reportbug @@ -33,7 +33,7 @@ ;; --tag | --ui | --interface | --type | --bts | --severity | --mode | -${noargopts}[TutBS]) _comp_compgen_split -- "$("$1" "$prev" help 2>&1 | - command sed -ne '/^[[:space:]]/p')" + command gsed -ne '/^[[:space:]]/p')" return ;; --editor | --mua | --mbox-reader-cmd | -${noargopts}e) --- bash-completion-2.16.0/completions/rpcdebug.orig +++ bash-completion-2.16.0/completions/rpcdebug @@ -13,7 +13,7 @@ if [[ $module ]]; then _comp_compgen_split -- "$(rpcdebug -vh 2>&1 | - command sed -ne 's/^'"$module"'[[:space:]]\{1,\}//p')" + command gsed -ne 's/^'"$module"'[[:space:]]\{1,\}//p')" fi } --- bash-completion-2.16.0/completions/rpm.orig +++ bash-completion-2.16.0/completions/rpm @@ -13,7 +13,7 @@ if [[ -r /var/log/rpmpkgs && /var/log/rpmpkgs -nt /var/lib/rpm/Packages ]]; then # using RHL 7.2 or later - this is quicker than querying the DB - _comp_compgen_split -- "$(command sed -ne \ + _comp_compgen_split -- "$(command gsed -ne \ 's|^\([^[:space:]]\{1,\}\)-[^[:space:]-]\{1,\}-[^[:space:]-]\{1,\}\.rpm$|\1|p' \ /var/log/rpmpkgs)" elif type rpmqpack &>/dev/null; then @@ -37,7 +37,7 @@ _comp_cmd_rpm__macros() { # get a list of macros - _comp_compgen_split -- "$("${1:-rpm}" --showrc | command sed -ne \ + _comp_compgen_split -- "$("${1:-rpm}" --showrc | command gsed -ne \ 's/^-\{0,1\}[0-9]\{1,\}[:=][[:space:]]\{1,\}\([^[:space:](]\{3,\}\).*/%\1/p')" } @@ -46,7 +46,7 @@ { # Case-insensitive BRE to match "compatible build archs" local regex_header='[cC][oO][mM][pP][aA][tT][iI][bB][lL][eE][[:space:]]\{1,\}[bB][uU][iI][lL][dD][[:space:]]\{1,\}[aA][rR][cC][hH][sS]' - _comp_compgen_split -- "$("${1:-rpm}" --showrc | command sed -ne \ + _comp_compgen_split -- "$("${1:-rpm}" --showrc | command gsed -ne \ "s/^[[:space:]]*${regex_header}[[:space:]]*:[[:space:]]*\(.*\)/\1/p")" } @@ -120,7 +120,7 @@ esac _comp_compgen_split -l -- "$("$1" -qa --nodigest \ --nosignature --queryformat="\"$fmt\\n\"" 2>/dev/null | - command grep -vF '(none)')" + command ggrep -vF '(none)')" fi return ;; @@ -281,7 +281,7 @@ _comp_cmd_rpm__configdir if [[ $cfgdir ]]; then _comp_compgen_split -- "$(command ls "$cfgdir" 2>/dev/null | - command sed -ne 's/^brp-//p')" + command gsed -ne 's/^brp-//p')" fi ;; --define | --with | --without | -${noargopts}D) --- bash-completion-2.16.0/completions/rsync.orig +++ bash-completion-2.16.0/completions/rsync @@ -85,7 +85,7 @@ # meaning before v3.2.0) contain the following unusual line in # --help: # "(-h) --help show this help (-h is --help only if used alone)" - _comp_compgen -Rv tmp help - <<<"$("$1" --help 2>&1 | command sed -e 's/^([^)]*)//')" + _comp_compgen -Rv tmp help - <<<"$("$1" --help 2>&1 | command gsed -e 's/^([^)]*)//')" _comp_compgen -- -W '"${tmp[@]}" --daemon --old-d{,irs} @@ -102,7 +102,7 @@ fi done if [[ $shell == ssh ]]; then - local rsync_version=$("$1" --version 2>/dev/null | sed -n '1s/.*rsync *version \([0-9.]*\).*/\1/p') + local rsync_version=$("$1" --version 2>/dev/null | gsed -n '1s/.*rsync *version \([0-9.]*\).*/\1/p') _comp_cmd_rsync__vercomp "$rsync_version" "3.2.4" if (($? == 2)); then _comp_compgen -x scp remote_files --- bash-completion-2.16.0/completions/sbopkg.orig +++ bash-completion-2.16.0/completions/sbopkg @@ -61,7 +61,7 @@ local file=${REPO_ROOT-}/${REPO_NAME-}/${REPO_BRANCH-}/SLACKBUILDS.TXT [[ -f $file && -r $file ]] || return - _comp_compgen_split -l -- "$(command sed -ne "s/^SLACKBUILD NAME: //p" \ + _comp_compgen_split -l -- "$(command gsed -ne "s/^SLACKBUILD NAME: //p" \ "$file")" _comp_compgen -aC "$QUEUEDIR" -- -f -X "!*.sqf" } && --- bash-completion-2.16.0/completions/screen.orig +++ bash-completion-2.16.0/completions/screen @@ -3,7 +3,7 @@ _comp_cmd_screen__sessions() { local -a sessions - _comp_split sessions "$(command screen -ls | command sed -ne \ + _comp_split sessions "$(command screen -ls | command gsed -ne \ 's|^\t\{1,\}\([0-9]\{1,\}\.[^\t]\{1,\}\).*'"$1"'.*$|\1|p')" || return if [[ $cur == +([0-9])?(.*) ]]; then # Complete sessions including pid prefixes --- bash-completion-2.16.0/completions/shellcheck.orig +++ bash-completion-2.16.0/completions/shellcheck @@ -3,7 +3,7 @@ _comp_cmd_shellcheck__optarg() { local args=$("$1" --help 2>&1 | - command sed -e 's/,/ /g' -ne 's/^.*'"$2"'\>.*(\([^)]*\)).*/\1/p') + command gsed -e 's/,/ /g' -ne 's/^.*'"$2"'\>.*(\([^)]*\)).*/\1/p') _comp_compgen -a -- -W '$args' } @@ -23,8 +23,8 @@ ;; --format | -${noargopts}f) local args=$("$1" --format=nonexistent-format /dev/null 2>&1 | - command sed -ne '/^Supported formats/,//p' | - command sed -ne '/^[[:space:]]/p') + command gsed -ne '/^Supported formats/,//p' | + command gsed -ne '/^[[:space:]]/p') _comp_compgen -- -W '$args' return ;; --- bash-completion-2.16.0/completions/sitecopy.orig +++ bash-completion-2.16.0/completions/sitecopy @@ -44,7 +44,7 @@ if [[ -r ~/.sitecopyrc ]]; then _comp_compgen_split -- "$("$1" -v | - command sed -n '/^Site:/s/Site: //p')" + command gsed -n '/^Site:/s/Site: //p')" fi } && complete -F _comp_cmd_sitecopy -o default sitecopy --- bash-completion-2.16.0/completions/slabtop.orig +++ bash-completion-2.16.0/completions/slabtop @@ -13,7 +13,7 @@ ;; --sort | -${noargopts}s) _comp_compgen_split -- "$( - "$1" --help | command sed \ + "$1" --help | command gsed \ -e '/^The following are valid sort criteria/,/^$/!d' \ -ne 's/^[[:space:]]\(.\):.*/\1/p' )" --- bash-completion-2.16.0/completions/slapt-get.orig +++ bash-completion-2.16.0/completions/slapt-get @@ -62,14 +62,14 @@ local name=${cur%%-*} _comp_compgen_split -l -- "$( LC_ALL=C "$1" -c "$config" --search "^$name" 2>/dev/null | - LC_ALL=C command sed -ne "/^$cur/{s/ .*$//;p;}" + LC_ALL=C command gsed -ne "/^$cur/{s/ .*$//;p;}" )" return ;; avl) # --install|-i| _comp_compgen_split -l -- "$( LC_ALL=C "$1" -c "$config" --available 2>/dev/null | - LC_ALL=C command sed -ne "/^$cur/{s/ .*$//;p;}" + LC_ALL=C command gsed -ne "/^$cur/{s/ .*$//;p;}" )" return ;; --- bash-completion-2.16.0/completions/slapt-src.orig +++ bash-completion-2.16.0/completions/slapt-src @@ -59,13 +59,13 @@ _comp_compgen_split -l -- "$( LC_ALL=C "$1" --config "$config" --search "^$name" 2>/dev/null | - command sed -ne "/^$cur/{s/^$name:\([^ ]*\) .*$/\1/;p;}" + command gsed -ne "/^$cur/{s/^$name:\([^ ]*\) .*$/\1/;p;}" )" else _comp_compgen_split -l -- "$( LC_ALL=C "$1" --config "$config" --search "^$cur" 2>/dev/null | - command sed -ne "/^$cur/{s/ .*$//;p;}" + command gsed -ne "/^$cur/{s/ .*$//;p;}" )" fi } && --- bash-completion-2.16.0/completions/smbclient.orig +++ bash-completion-2.16.0/completions/smbclient @@ -16,7 +16,7 @@ { if [[ ${BASH_COMPLETION_CMD_SMBTREE_SCAN-${COMP_SAMBA_SCAN-}} ]]; then _comp_compgen_split -- "$(smbtree -N -S | - command sed -ne 's/^[[:space:]]*\\\\*\([^[:space:]]*\).*/\1/p')" + command gsed -ne 's/^[[:space:]]*\\\\*\([^[:space:]]*\).*/\1/p')" fi } --- bash-completion-2.16.0/completions/ss.orig +++ bash-completion-2.16.0/completions/ss @@ -17,7 +17,7 @@ ;; --query | -${noargopts}A) local queries=$("$1" --help | - command sed -e 's/|/ /g' -ne 's/.*QUERY := {\([^}]*\)}.*/\1/p') + command gsed -e 's/|/ /g' -ne 's/.*QUERY := {\([^}]*\)}.*/\1/p') _comp_delimited , -W '$queries' return ;; --- bash-completion-2.16.0/completions/ssh.orig +++ bash-completion-2.16.0/completions/ssh @@ -494,7 +494,7 @@ # unescape (3 backslashes to 1 for chars we escaped) # shellcheck disable=SC2090 - _path=$(command sed -e 's/\\\\\\\('"$_comp_cmd_scp__path_esc"'\)/\\\1/g' <<<"$_path") + _path=$(command gsed -e 's/\\\\\\\('"$_comp_cmd_scp__path_esc"'\)/\\\1/g' <<<"$_path") # default to home dir of specified user on remote host if [[ ! $_path ]]; then @@ -512,14 +512,14 @@ # shellcheck disable=SC2090 _files=$(ssh -o 'Batchmode yes' "$_userhost" \ command ls -aF1dL "$_path*" 2>/dev/null | - command sed -e 's/'"$_comp_cmd_scp__path_esc"'/'"$_escape_replacement"'/g' -e '/[^\/]$/d') + command gsed -e 's/'"$_comp_cmd_scp__path_esc"'/'"$_escape_replacement"'/g' -e '/[^\/]$/d') else # escape problematic characters; remove executables, aliases, pipes # and sockets; add space at end of file names # shellcheck disable=SC2090 _files=$(ssh -o 'Batchmode yes' "$_userhost" \ command ls -aF1dL "$_path*" 2>/dev/null | - command sed -e 's/'"$_comp_cmd_scp__path_esc"'/'"$_escape_replacement"'/g' -e 's/[*@|=]$//g' \ + command gsed -e 's/'"$_comp_cmd_scp__path_esc"'/'"$_escape_replacement"'/g' -e 's/[*@|=]$//g' \ -e 's/[^\/]$/& /g') fi _comp_compgen -R split -l -- "$_files" @@ -549,13 +549,13 @@ if [[ $_dirsonly ]]; then _comp_compgen -U files split -l -- "$( command ls -aF1dL "${files[@]}" 2>/dev/null | - command sed -e "s/$_comp_cmd_scp__path_esc/\\\\&/g" \ + command gsed -e "s/$_comp_cmd_scp__path_esc/\\\\&/g" \ -e '/[^\/]$/d' -e "s/^/${1-}/" )" else _comp_compgen -U files split -l -- "$( command ls -aF1dL "${files[@]}" 2>/dev/null | - command sed -e "s/$_comp_cmd_scp__path_esc/\\\\&/g" \ + command gsed -e "s/$_comp_cmd_scp__path_esc/\\\\&/g" \ -e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' -e "s/^/${1-}/" )" fi --- bash-completion-2.16.0/completions/strings.orig +++ bash-completion-2.16.0/completions/strings @@ -18,12 +18,12 @@ ;; --target | -${noargopts}T) _comp_compgen_split -- "$(LC_ALL=C "$1" --help 2>/dev/null | - command sed -ne 's/: supported targets: \(.*\)/\1/p')" + command gsed -ne 's/: supported targets: \(.*\)/\1/p')" return ;; --encoding | -${noargopts}e) _comp_compgen_split -F , -- "$(LC_ALL=C "$1" --help 2>/dev/null | - command sed -ne 's/.*--encoding={\([^}]*\)}.*/\1/p')" + command gsed -ne 's/.*--encoding={\([^}]*\)}.*/\1/p')" return ;; esac @@ -34,7 +34,7 @@ # macOS: ... [-t format] [-number] [-n number] ... _comp_compgen_help || _comp_compgen_usage - <<<"$("$1" --help 2>&1 | - command sed -e "s/\[-number\]//")" + command gsed -e "s/\[-number\]//")" [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return elif [[ $cur == @* ]]; then --- bash-completion-2.16.0/completions/svcadm.orig +++ bash-completion-2.16.0/completions/svcadm @@ -25,7 +25,7 @@ _gen_zoneadm_list() { if [[ ${prev} =~ "-z" ]]; then - local zones="$(zoneadm list -c | grep -v '^global$')" + local zones="$(zoneadm list -c | ggrep -v '^global$')" COMPREPLY=( $(compgen -W "${zones}" -- ${cur}) ) fi } @@ -133,7 +133,7 @@ else # svcadm [-v] milestone [-d] milestone_FMRI if [[ ${line} =~ -S ]]; then - command_list="$(echo ${command_list} | sed -e 's/milestone//')" + command_list="$(echo ${command_list} | gsed -e 's/milestone//')" fi COMPREPLY=( $(compgen -W "${command_list}" -- ${cur}) ) fi --- bash-completion-2.16.0/completions/svk.orig +++ bash-completion-2.16.0/completions/svk @@ -198,7 +198,7 @@ path=// fi _comp_compgen_split -- "$("$1" list "$path" 2>/dev/null | - command sed -e 's|\(.*\)|'"$path"'\1|')" + command gsed -e 's|\(.*\)|'"$path"'\1|')" ;; *) _comp_compgen_filedir --- bash-completion-2.16.0/completions/sysbench.orig +++ bash-completion-2.16.0/completions/sysbench @@ -75,7 +75,7 @@ ;; --db-driver) _comp_compgen_split -- "$("$1" --test=oltp help 2>/dev/null | - command sed -e '/^.*database drivers:/,/^$/!d' \ + command gsed -e '/^.*database drivers:/,/^$/!d' \ -ne 's/^ *\([^ ]*\) .*/\1/p')" return ;; --- bash-completion-2.16.0/completions/tox.orig +++ bash-completion-2.16.0/completions/tox @@ -33,7 +33,7 @@ } 2>/dev/null ) [[ $envs ]] || envs=$( - command sed -e 's/,/ /g' -ne 's/^envlist[[:space:]]*=//p' \ + command gsed -e 's/,/ /g' -ne 's/^envlist[[:space:]]*=//p' \ tox.ini 2>/dev/null ) _comp_delimited , -X '*[{}]*' -W "$envs ALL" --- bash-completion-2.16.0/completions/tshark.orig +++ bash-completion-2.16.0/completions/tshark @@ -23,7 +23,7 @@ _comp_compgen -c "${cur#*:}" filedir else [[ -v _comp_cmd_tshark__prefs ]] || - _comp_cmd_tshark__prefs="$("$1" -G defaultprefs 2>/dev/null | command sed -ne 's/^#\{0,1\}\([a-z0-9_.-]\{1,\}:\).*/\1/p' | + _comp_cmd_tshark__prefs="$("$1" -G defaultprefs 2>/dev/null | command gsed -ne 's/^#\{0,1\}\([a-z0-9_.-]\{1,\}:\).*/\1/p' | tr '\n' ' ')" : ${prefix:=} _comp_compgen -c "${cur:${#prefix}}" -- -P "$prefix" \ --- bash-completion-2.16.0/completions/update-alternatives.orig +++ bash-completion-2.16.0/completions/update-alternatives @@ -83,7 +83,7 @@ _comp_cmd_update_alternatives__installed ;; *) - _comp_compgen_help - <<<"$(LANG=C "$1" --help 2>&1 | command sed ' + _comp_compgen_help - <<<"$(LANG=C "$1" --help 2>&1 | command gsed ' /usage:/,/^[[:space:]]*$/{ s/^\([[:space:]]*usage:\)\{0,1\}[[:space:]]*[^[:space:]]*alternatives / / s/^[[:space:]]*\[\(-.*\)\]/ \1/ --- bash-completion-2.16.0/completions/valgrind.orig +++ bash-completion-2.16.0/completions/valgrind @@ -72,7 +72,7 @@ --+([-A-Za-z0-9_])) # shellcheck disable=SC2086 local value=$("$1" --help-debug $tool 2>/dev/null | - command sed \ + command gsed \ -ne "s|^[[:blank:]]*$prev=\([^[:blank:]]\{1,\}\).*|\1|p") case $value in \) --- bash-completion-2.16.0/completions/wget.orig +++ bash-completion-2.16.0/completions/wget @@ -123,7 +123,7 @@ return ;; --user | --http-user | --proxy-user | --ftp-user) - _comp_compgen_split -- "$(command sed -n \ + _comp_compgen_split -- "$(command gsed -n \ '/^login/s/^[[:blank:]]*login[[:blank:]]//p' ~/.netrc \ 2>/dev/null)" return --- bash-completion-2.16.0/completions/wol.orig +++ bash-completion-2.16.0/completions/wol @@ -17,7 +17,7 @@ _comp_compgen_split -- "$({ ip -c=never addr show || ip addr show || ifconfig -a } 2>/dev/null | - command sed \ + command gsed \ -ne 's/.*[[:space:]]Bcast:\([^[:space:]]*\).*/\1/p' \ -ne 's/.*inet.*[[:space:]]brd[[:space:]]\([^[:space:]]*\).*/\1/p' \ -ne 's/.*[[:space:]]broadcast[[:space:]]\{1,\}\([^[:space:]]*\).*/\1/p')" --- bash-completion-2.16.0/completions/wvdial.orig +++ bash-completion-2.16.0/completions/wvdial @@ -33,7 +33,7 @@ done # parse config files for sections and # remove default section - _comp_compgen_split -l -X 'Defaults' -- "$(command sed -ne \ + _comp_compgen_split -l -X 'Defaults' -- "$(command gsed -ne \ 's/^\[Dialer \(.*\)\]$/\1/p' "$config" 2>/dev/null)" # escape spaces COMPREPLY=("${COMPREPLY[@]// /\\ }") --- bash-completion-2.16.0/completions/xgamma.orig +++ bash-completion-2.16.0/completions/xgamma @@ -7,7 +7,7 @@ case "$prev" in -screen) - local screens=$(xrandr --query 2>/dev/null | command sed -n \ + local screens=$(xrandr --query 2>/dev/null | command gsed -n \ '/^Screen /s|^Screen \{1,\}\(.*\):.*$|\1|p' 2>/dev/null) _comp_compgen -- -W "$screens" return @@ -30,7 +30,7 @@ compopt -o nospace elif [[ $cur == :*.* ]]; then # local screen numbers - local t screens=$(xrandr --query 2>/dev/null | command sed -ne \ + local t screens=$(xrandr --query 2>/dev/null | command gsed -ne \ '/^Screen /s|^Screen \{1,\}\(.*\):.*$|\1|p' 2>/dev/null) t="${cur#:}" _comp_compgen -c "${cur##*.}" -- -P "${t%.*}." -W '$screens' --- bash-completion-2.16.0/completions/xrandr.orig +++ bash-completion-2.16.0/completions/xrandr @@ -9,20 +9,20 @@ { _comp_compgen_split -- "$( "$1" --listmonitors 2>/dev/null | - command sed -ne 's/.* [0-9]*: [+\*]*\([^ ]*\).*/\1/p' + command gsed -ne 's/.* [0-9]*: [+\*]*\([^ ]*\).*/\1/p' )" } _comp_cmd_xrandr__compgen_providers() { _comp_compgen_split -- "$("$1" --listproviders 2>/dev/null | - command sed -ne "s/.*cap:.*$2.* name:\([^ ]*\).*/\1/p")" + command gsed -ne "s/.*cap:.*$2.* name:\([^ ]*\).*/\1/p")" } _comp_cmd_xrandr__compgen_modes() { _comp_compgen_split -- "$( - "$1" -q 2>/dev/null | command sed \ + "$1" -q 2>/dev/null | command gsed \ -e "1,/^$2 / d" \ -e '/connected/,$ d' \ -e '/^[[:space:]]*h: / d' \ @@ -34,7 +34,7 @@ _comp_cmd_xrandr__compgen_all_modes() { _comp_compgen_split -- "$( - "$1" -q 2>/dev/null | command sed \ + "$1" -q 2>/dev/null | command gsed \ -e '/^[^[:space:]].*/ d' \ -e '/^[[:space:]]*h: / d' \ -e '/^[[:space:]]*v: / d' \ @@ -161,13 +161,13 @@ if [[ $has_output ]]; then _comp_compgen -v options help - <<<"$( "$1" --help 2>/dev/null | - command sed -e 's/ or /\n /g' -e 's/<[^>]*>]//g' + command gsed -e 's/ or /\n /g' -e 's/<[^>]*>]//g' )" else # if no output is specified, remove per-output options _comp_compgen -v options help - <<<"$( "$1" --help 2>/dev/null | - command sed -e '/^ -/!d' -e 's/ or /\n /g' -e 's/<[^>]*>]//g' + command gsed -e '/^ -/!d' -e 's/ or /\n /g' -e 's/<[^>]*>]//g' )" fi --- bash-completion-2.16.0/completions/xsltproc.orig +++ bash-completion-2.16.0/completions/xsltproc @@ -16,7 +16,7 @@ ;; --encoding) # some aliases removed - local encodings=$(iconv -l | command sed -e 's/\/.*//') + local encodings=$(iconv -l | command gsed -e 's/\/.*//') _comp_compgen -- -X '@(UTF[1378]|8859|ISO[0-9_])*' -W '$encodings' return ;; --- bash-completion-2.16.0/completions/zfs.orig +++ bash-completion-2.16.0/completions/zfs @@ -141,7 +141,7 @@ return 1 fi local range_start=$(expr "$cur" : '\(.*%\)') - $__ZFS_CMD list -H -o name -s name -t snapshot -d 1 $base_dataset | sed 's$.*@$'$range_start'$g' + $__ZFS_CMD list -H -o name -s name -t snapshot -d 1 $base_dataset | gsed 's$.*@$'$range_start'$g' fi else __zfs_match_snapshot_or_bookmark --- bash-completion-2.16.0/completions/zones.orig +++ bash-completion-2.16.0/completions/zones @@ -31,7 +31,7 @@ esac else # Provide running zone names - local zones=$(zoneadm list | grep -v '^global$') + local zones=$(zoneadm list | ggrep -v '^global$') COMPREPLY=( $(compgen -W "${zones}" -- ${cur}) ) fi } @@ -45,7 +45,7 @@ if [[ ${prev} =~ "-z" ]]; then # Provide running zone names - local zones="$(zoneadm list -c | grep -v '^global$')" + local zones="$(zoneadm list -c | ggrep -v '^global$')" COMPREPLY=( $(compgen -W "${zones}" -- ${cur}) ) fi }