**(#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)