Remove useless and non posix -e switch to awk invocations in rc scripts

Fixes #705
This commit is contained in:
Maxime Coste 2016-06-21 19:00:41 +01:00
parent b77eff1b72
commit 796a2ad63d
3 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ def -params 0..1 \
export tagname=${1:-${kak_selection}} export tagname=${1:-${kak_selection}}
for tags in $(printf %s\\n "${kak_opt_ctagsfiles}" | tr ':' '\n'); do for tags in $(printf %s\\n "${kak_opt_ctagsfiles}" | tr ':' '\n'); do
export tagroot="$(readlink -f $(dirname "$tags"))/" export tagroot="$(readlink -f $(dirname "$tags"))/"
readtags -t "${tags}" ${tagname} | awk -F '\t|\n' -e ' readtags -t "${tags}" ${tagname} | awk -F '\t|\n' '
/[^\t]+\t[^\t]+\t\/\^.*\$?\// { /[^\t]+\t[^\t]+\t\/\^.*\$?\// {
re=$0; re=$0;
sub(".*\t/\\^", "", re); sub("\\$?/$", "", re); gsub("(\\{|\\}|\\\\E).*$", "", re); sub(".*\t/\\^", "", re); sub("\\$?/$", "", re); gsub("(\\{|\\}|\\\\E).*$", "", re);

View File

@ -42,7 +42,7 @@ def clang-parse -params 0..1 -docstring "Parse the contents of the current buffe
header="${kak_cursor_line}.${kak_cursor_column}@${kak_timestamp}" header="${kak_cursor_line}.${kak_cursor_column}@${kak_timestamp}"
compl=$(clang++ -x ${ft} -fsyntax-only ${kak_opt_clang_options} \ compl=$(clang++ -x ${ft} -fsyntax-only ${kak_opt_clang_options} \
-Xclang -code-completion-brief-comments -Xclang -code-completion-at=${pos} - < ${dir}/buf 2> ${dir}/stderr | -Xclang -code-completion-brief-comments -Xclang -code-completion-at=${pos} - < ${dir}/buf 2> ${dir}/stderr |
awk -F ': ' -e ' awk -F ': ' '
/^COMPLETION:/ && ! /\(Hidden\)/ { /^COMPLETION:/ && ! /\(Hidden\)/ {
id=$2 id=$2
gsub(/ +$/, "", id) gsub(/ +$/, "", id)

View File

@ -64,7 +64,7 @@ def -params 1.. \
try %{ addhl flag_lines GitBlame git_blame_flags } try %{ addhl flag_lines GitBlame git_blame_flags }
set buffer=$kak_bufname git_blame_flags '$kak_timestamp' set buffer=$kak_bufname git_blame_flags '$kak_timestamp'
}" | kak -p ${kak_session} }" | kak -p ${kak_session}
git blame "$@" --incremental ${kak_buffile} | awk -e ' git blame "$@" --incremental ${kak_buffile} | awk '
function send_flags(text, flag, i) { function send_flags(text, flag, i) {
if (line == "") { return; } if (line == "") { return; }
text=substr(sha,1,8) " " dates[sha] " " authors[sha] text=substr(sha,1,8) " " dates[sha] " " authors[sha]
@ -94,7 +94,7 @@ def -params 1.. \
} }
update_diff() { update_diff() {
git diff -U0 $kak_buffile | awk -e ' git diff -U0 $kak_buffile | awk '
BEGIN { BEGIN {
line=0 line=0
flags=ENVIRON["kak_timestamp"] flags=ENVIRON["kak_timestamp"]