**(#zzyjqvq) So I re-write this shell alias that I used all the time alias dkv="docker rm"
to be a much safer shell function:
dkv() {
if ...**
So I re-write this shell alias that I used all the time `alias dkv="docker rm"` to be a much safer shell function:
dkv() {
if [[ “$1” == “rm” && -n “$2” ]]; then
read -r -p "Are you sure you want to delete volume '$2'? [Y/n] " confirm
confirm=${confirm:-Y}
if [[ "$confirm" =~ ^[Yy]$ ]]; then
# Disable history
set +o history
# Delete the volume
dock ... ⌘ [Read more](https://twtxt.net/twt/ml3toqq)