From 24f9d3d12f881544ac35008cb4c9e8462fbc97a4 Mon Sep 17 00:00:00 2001 From: Danny Ben Shitrit Date: Fri, 24 May 2024 04:31:53 +0000 Subject: [PATCH] - Revert wordbreak (colon) patch --- lib/completely/templates/template.erb | 5 ----- spec/approvals/cli/generated-script | 5 ----- spec/approvals/cli/generated-script-alt | 5 ----- spec/approvals/cli/generated-wrapped-script | 5 ----- spec/approvals/cli/test/completely-tester-1.sh | 5 ----- spec/approvals/cli/test/completely-tester-2.sh | 5 ----- spec/approvals/cli/test/completely-tester.sh | 5 ----- spec/approvals/completions/function | 5 ----- spec/approvals/completions/script | 5 ----- spec/approvals/completions/script-only-spaces | 5 ----- spec/approvals/completions/script-with-debug | 3 --- spec/fixtures/tester/default.bash | 5 ----- 12 files changed, 58 deletions(-) diff --git a/lib/completely/templates/template.erb b/lib/completely/templates/template.erb index aea1f2b..9af38be 100644 --- a/lib/completely/templates/template.erb +++ b/lib/completely/templates/template.erb @@ -27,9 +27,6 @@ local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") local compline="${compwords[*]}" - local original_comp_wordbreaks="$COMP_WORDBREAKS" - COMP_WORDBREAKS="${COMP_WORDBREAKS//[:=]/}" - % if ENV['COMPLETELY_DEBUG'] if [[ -n "$COMPLETELY_DEBUG" ]]; then echo "compline: '$compline'" > 'completely-debug.txt' @@ -46,8 +43,6 @@ % end esac - - COMP_WORDBREAKS="$original_comp_wordbreaks" } && complete -F <%= function_name %> <%= command %> diff --git a/spec/approvals/cli/generated-script b/spec/approvals/cli/generated-script index 8b170a0..14c6e0f 100644 --- a/spec/approvals/cli/generated-script +++ b/spec/approvals/cli/generated-script @@ -27,9 +27,6 @@ _mygit_completions() { local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") local compline="${compwords[*]}" - local original_comp_wordbreaks="$COMP_WORDBREAKS" - COMP_WORDBREAKS="${COMP_WORDBREAKS//[:=]/}" - case "$compline" in 'status'*) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_mygit_completions_filter "--help --verbose --branch $(git branch 2>/dev/null)")" -- "$cur") @@ -48,8 +45,6 @@ _mygit_completions() { ;; esac - - COMP_WORDBREAKS="$original_comp_wordbreaks" } && complete -F _mygit_completions mygit diff --git a/spec/approvals/cli/generated-script-alt b/spec/approvals/cli/generated-script-alt index 1887993..7b7c724 100644 --- a/spec/approvals/cli/generated-script-alt +++ b/spec/approvals/cli/generated-script-alt @@ -27,9 +27,6 @@ _mycomps() { local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") local compline="${compwords[*]}" - local original_comp_wordbreaks="$COMP_WORDBREAKS" - COMP_WORDBREAKS="${COMP_WORDBREAKS//[:=]/}" - case "$compline" in 'status'*) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_mycomps_filter "--help --verbose --branch $(git branch 2>/dev/null)")" -- "$cur") @@ -48,8 +45,6 @@ _mycomps() { ;; esac - - COMP_WORDBREAKS="$original_comp_wordbreaks" } && complete -F _mycomps mygit diff --git a/spec/approvals/cli/generated-wrapped-script b/spec/approvals/cli/generated-wrapped-script index 7dde251..46ded88 100644 --- a/spec/approvals/cli/generated-wrapped-script +++ b/spec/approvals/cli/generated-wrapped-script @@ -28,9 +28,6 @@ give_comps() { echo $' local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}")' echo $' local compline="${compwords[*]}"' echo $'' - echo $' local original_comp_wordbreaks="$COMP_WORDBREAKS"' - echo $' COMP_WORDBREAKS="${COMP_WORDBREAKS//[:=]/}"' - echo $'' echo $' case "$compline" in' echo $' \'status\'*)' echo $' while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_mygit_completions_filter "--help --verbose --branch $(git branch 2>/dev/null)")" -- "$cur")' @@ -49,8 +46,6 @@ give_comps() { echo $' ;;' echo $'' echo $' esac' - echo $'' - echo $' COMP_WORDBREAKS="$original_comp_wordbreaks"' echo $'} &&' echo $' complete -F _mygit_completions mygit' echo $'' diff --git a/spec/approvals/cli/test/completely-tester-1.sh b/spec/approvals/cli/test/completely-tester-1.sh index 7050645..961abf7 100644 --- a/spec/approvals/cli/test/completely-tester-1.sh +++ b/spec/approvals/cli/test/completely-tester-1.sh @@ -35,9 +35,6 @@ _mygit_completions() { local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") local compline="${compwords[*]}" - local original_comp_wordbreaks="$COMP_WORDBREAKS" - COMP_WORDBREAKS="${COMP_WORDBREAKS//[:=]/}" - case "$compline" in 'status'*) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_mygit_completions_filter "--help --verbose --branch $(git branch 2>/dev/null)")" -- "$cur") @@ -56,8 +53,6 @@ _mygit_completions() { ;; esac - - COMP_WORDBREAKS="$original_comp_wordbreaks" } && complete -F _mygit_completions mygit diff --git a/spec/approvals/cli/test/completely-tester-2.sh b/spec/approvals/cli/test/completely-tester-2.sh index 191d5aa..8a4414f 100644 --- a/spec/approvals/cli/test/completely-tester-2.sh +++ b/spec/approvals/cli/test/completely-tester-2.sh @@ -35,9 +35,6 @@ _mygit_completions() { local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") local compline="${compwords[*]}" - local original_comp_wordbreaks="$COMP_WORDBREAKS" - COMP_WORDBREAKS="${COMP_WORDBREAKS//[:=]/}" - case "$compline" in 'status'*) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_mygit_completions_filter "--help --verbose --branch $(git branch 2>/dev/null)")" -- "$cur") @@ -56,8 +53,6 @@ _mygit_completions() { ;; esac - - COMP_WORDBREAKS="$original_comp_wordbreaks" } && complete -F _mygit_completions mygit diff --git a/spec/approvals/cli/test/completely-tester.sh b/spec/approvals/cli/test/completely-tester.sh index 294ed37..fb37e05 100644 --- a/spec/approvals/cli/test/completely-tester.sh +++ b/spec/approvals/cli/test/completely-tester.sh @@ -35,9 +35,6 @@ _mygit_completions() { local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") local compline="${compwords[*]}" - local original_comp_wordbreaks="$COMP_WORDBREAKS" - COMP_WORDBREAKS="${COMP_WORDBREAKS//[:=]/}" - case "$compline" in 'status'*) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_mygit_completions_filter "--help --verbose --branch $(git branch 2>/dev/null)")" -- "$cur") @@ -56,8 +53,6 @@ _mygit_completions() { ;; esac - - COMP_WORDBREAKS="$original_comp_wordbreaks" } && complete -F _mygit_completions mygit diff --git a/spec/approvals/completions/function b/spec/approvals/completions/function index 321e6ac..ffc08ef 100644 --- a/spec/approvals/completions/function +++ b/spec/approvals/completions/function @@ -28,9 +28,6 @@ send_completions() { echo $' local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}")' echo $' local compline="${compwords[*]}"' echo $'' - echo $' local original_comp_wordbreaks="$COMP_WORDBREAKS"' - echo $' COMP_WORDBREAKS="${COMP_WORDBREAKS//[:=]/}"' - echo $'' echo $' case "$compline" in' echo $' \'generate\'*)' echo $' while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -W "$(_completely_completions_filter "--help --force")" -- "$cur")' @@ -45,8 +42,6 @@ send_completions() { echo $' ;;' echo $'' echo $' esac' - echo $'' - echo $' COMP_WORDBREAKS="$original_comp_wordbreaks"' echo $'} &&' echo $' complete -F _completely_completions completely' echo $'' diff --git a/spec/approvals/completions/script b/spec/approvals/completions/script index 336a4cb..12e741f 100644 --- a/spec/approvals/completions/script +++ b/spec/approvals/completions/script @@ -27,9 +27,6 @@ _completely_completions() { local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") local compline="${compwords[*]}" - local original_comp_wordbreaks="$COMP_WORDBREAKS" - COMP_WORDBREAKS="${COMP_WORDBREAKS//[:=]/}" - case "$compline" in 'generate'*) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -W "$(_completely_completions_filter "--help --force")" -- "$cur") @@ -44,8 +41,6 @@ _completely_completions() { ;; esac - - COMP_WORDBREAKS="$original_comp_wordbreaks" } && complete -F _completely_completions completely diff --git a/spec/approvals/completions/script-only-spaces b/spec/approvals/completions/script-only-spaces index 0b54cfe..28c4a1f 100644 --- a/spec/approvals/completions/script-only-spaces +++ b/spec/approvals/completions/script-only-spaces @@ -27,9 +27,6 @@ _completely_completions() { local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") local compline="${compwords[*]}" - local original_comp_wordbreaks="$COMP_WORDBREAKS" - COMP_WORDBREAKS="${COMP_WORDBREAKS//[:=]/}" - case "$compline" in 'generate'*) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -W "$(_completely_completions_filter "--help --force")" -- "$cur") @@ -40,8 +37,6 @@ _completely_completions() { ;; esac - - COMP_WORDBREAKS="$original_comp_wordbreaks" } && complete -F _completely_completions completely diff --git a/spec/approvals/completions/script-with-debug b/spec/approvals/completions/script-with-debug index 17b5007..b39bc0f 100644 --- a/spec/approvals/completions/script-with-debug +++ b/spec/approvals/completions/script-with-debug @@ -27,9 +27,6 @@ _completely_completions() { local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") local compline="${compwords[*]}" - local original_comp_wordbreaks="$COMP_WORDBREAKS" - COMP_WORDBREAKS="${COMP_WORDBREAKS//[:=]/}" - if [[ -n "$COMPLETELY_DEBUG" ]]; then echo "compline: '$compline'" > 'completely-debug.txt' echo "cur: '$cur'" >> 'completely-debug.txt' diff --git a/spec/fixtures/tester/default.bash b/spec/fixtures/tester/default.bash index 7045747..5359072 100644 --- a/spec/fixtures/tester/default.bash +++ b/spec/fixtures/tester/default.bash @@ -27,9 +27,6 @@ _cli_completions() { local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") local compline="${compwords[*]}" - local original_comp_wordbreaks="$COMP_WORDBREAKS" - COMP_WORDBREAKS="${COMP_WORDBREAKS//[:=]/}" - case "$compline" in 'command childcommand'*) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_cli_completions_filter "--quiet --verbose -q -v")" -- "$cur") @@ -48,8 +45,6 @@ _cli_completions() { ;; esac - - COMP_WORDBREAKS="$original_comp_wordbreaks" } && complete -F _cli_completions cli