Rename `_filterbuf` to `_buffer`

This commit is contained in:
rwxrob 2021-08-09 19:01:36 -04:00
parent d7afbb80fb
commit e1bfbf8e38
No known key found for this signature in database
GPG Key ID: 1CCACEDD2F65578E
2 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ gh repo create rwxrob/mycmd -p rwxrob/template-bash-command
Obviously, not all of this is needed for many Bash scripts, but anything Obviously, not all of this is needed for many Bash scripts, but anything
with more than two subcommands will benefit from the builtin tab with more than two subcommands will benefit from the builtin tab
completion, embedded Markdown help documentation support, and included completion, embedded Markdown help documentation support, and included
functions (`usage`, `_filter`, `_filterbuf`, `_have`, etc.) functions (`usage`, `_filter`, `_buffer`, `_have`, etc.)
## Installation ## Installation

View File

@ -40,7 +40,7 @@ x_foo() {
help[bar]='The `bar` command bars.' help[bar]='The `bar` command bars.'
x_bar() { x_bar() {
_filterbuf "$@" && return $? _buffer "$@" && return $?
echo "would bar: $*" echo "would bar: $*"
} }
@ -107,7 +107,7 @@ _filter(){
done done
} }
_filterbuf() { _buffer() {
[[ -n "$1" ]] && return 1 [[ -n "$1" ]] && return 1
"${FUNCNAME[1]}" "$(</dev/stdin)" "${FUNCNAME[1]}" "$(</dev/stdin)"
} }