File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -586,20 +586,6 @@ _comp_get_comp_words_by_ref()
586
586
(( ${# upvars[@]} )) && local " ${upvars[@]} " && _comp_upvars " ${upargs[@]} "
587
587
}
588
588
589
- # Get word previous to the current word.
590
- # This is a good alternative to `prev=${COMP_WORDS[COMP_CWORD-1]}' because bash4
591
- # will properly return the previous word with respect to any given exclusions to
592
- # COMP_WORDBREAKS.
593
- # @deprecated Use `_comp_get_comp_words_by_ref cur prev' instead
594
- # @see _comp_get_comp_words_by_ref()
595
- #
596
- _get_pword ()
597
- {
598
- if (( COMP_CWORD >= 1 )) ; then
599
- _get_cword " ${@ -} " 1
600
- fi
601
- }
602
-
603
589
# If the word-to-complete contains a colon (:), left-trim COMPREPLY items with
604
590
# word-to-complete.
605
591
# With a colon in COMP_WORDBREAKS, words containing
Original file line number Diff line number Diff line change @@ -130,6 +130,20 @@ _get_cword()
130
130
fi
131
131
} # _get_cword()
132
132
133
+ # Get word previous to the current word.
134
+ # This is a good alternative to `prev=${COMP_WORDS[COMP_CWORD-1]}' because bash4
135
+ # will properly return the previous word with respect to any given exclusions to
136
+ # COMP_WORDBREAKS.
137
+ # @deprecated Use `_comp_get_comp_words_by_ref cur prev' instead
138
+ # @see _comp_get_comp_words_by_ref()
139
+ #
140
+ _get_pword ()
141
+ {
142
+ if (( COMP_CWORD >= 1 )) ; then
143
+ _get_cword " ${@ -} " 1
144
+ fi
145
+ }
146
+
133
147
# @deprecated Use the variable `_comp_backup_glob` instead. This is the
134
148
# backward-compatibility name.
135
149
# shellcheck disable=SC2154 # defined in the main "bash_completion"
You can’t perform that action at this time.
0 commit comments