mirror of
https://github.com/octoleo/hosts.git
synced 2024-11-22 04:45:11 +00:00
Remove unused helper functions.
This commit is contained in:
parent
d775353c9a
commit
47b5d51fa3
48
hosts
48
hosts
@ -344,54 +344,6 @@ _join() {
|
|||||||
printf "%s" "${@/#/${_delimiter}}" | tr -d '[:space:]'
|
printf "%s" "${@/#/${_delimiter}}" | tr -d '[:space:]'
|
||||||
}
|
}
|
||||||
|
|
||||||
# _blank()
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# _blank "$an_argument"
|
|
||||||
#
|
|
||||||
# Exit Status:
|
|
||||||
# 0 If the argument is not present or null.
|
|
||||||
# 1 If the argument is present and not null.
|
|
||||||
_blank() {
|
|
||||||
[[ -z "${1:-}" ]]
|
|
||||||
}
|
|
||||||
|
|
||||||
# _present()
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# _present "$an_argument"
|
|
||||||
#
|
|
||||||
# Exit Status:
|
|
||||||
# 0 If the argument is present and not null.
|
|
||||||
# 1 If the argument is not present or null.
|
|
||||||
_present() {
|
|
||||||
[[ -n "${1:-}" ]]
|
|
||||||
}
|
|
||||||
|
|
||||||
# _interactive_input()
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# _interactive_input
|
|
||||||
#
|
|
||||||
# Exit Status:
|
|
||||||
# 0 If the current input is interactive (eg, a shell).
|
|
||||||
# 1 If the current input is stdin / piped input.
|
|
||||||
_interactive_input() {
|
|
||||||
[[ -t 0 ]]
|
|
||||||
}
|
|
||||||
|
|
||||||
# _piped_input()
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# _piped_input
|
|
||||||
#
|
|
||||||
# Exit Status:
|
|
||||||
# 0 If the current input is stdin / piped input.
|
|
||||||
# 1 If the current input is interactive (eg, a shell).
|
|
||||||
_piped_input() {
|
|
||||||
! _interactive_input
|
|
||||||
}
|
|
||||||
|
|
||||||
# _print_entries()
|
# _print_entries()
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
|
Loading…
Reference in New Issue
Block a user