Rename `_filterbuf` to `_buffer`
This commit is contained in:
parent
d7afbb80fb
commit
e1bfbf8e38
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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)"
|
||||||
}
|
}
|
Loading…
Reference in New Issue