mirror of
https://github.com/octoleo/hosts.git
synced 2024-11-22 12:55:11 +00:00
Add delete
alias for remove
.
This commit is contained in:
parent
d772e7c13e
commit
ce605e8c0c
5
hosts
5
hosts
@ -521,7 +521,7 @@ desc() {
|
|||||||
else # set ------------------------------------------------------------------
|
else # set ------------------------------------------------------------------
|
||||||
if [[ -n "${2:-}" ]]
|
if [[ -n "${2:-}" ]]
|
||||||
then # argument is present
|
then # argument is present
|
||||||
read -r -d '' "___desc_${1}" <<HEREDOC
|
read -r -d '' "___desc_${1}" <<HEREDOC || true
|
||||||
${2}
|
${2}
|
||||||
HEREDOC
|
HEREDOC
|
||||||
|
|
||||||
@ -1299,6 +1299,8 @@ remove() {
|
|||||||
|
|
||||||
printf "Removed:\\n%s\\n" "${_target_records}"
|
printf "Removed:\\n%s\\n" "${_target_records}"
|
||||||
}
|
}
|
||||||
|
desc "delete" "$(desc --get 'remove')"
|
||||||
|
delete() { remove "${@}"; }
|
||||||
|
|
||||||
# ---------------------------------------------------------------------- search
|
# ---------------------------------------------------------------------- search
|
||||||
|
|
||||||
@ -1436,6 +1438,7 @@ _SUBCOMMANDS=(
|
|||||||
help
|
help
|
||||||
list
|
list
|
||||||
remove
|
remove
|
||||||
|
delete
|
||||||
search
|
search
|
||||||
show
|
show
|
||||||
unblock
|
unblock
|
||||||
|
Loading…
Reference in New Issue
Block a user