From 97ae98280f767a725a3ac8b31f221a1675646746 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Sat, 15 Feb 2025 11:29:40 +0100 Subject: [PATCH] Add mc helper for mkdir -p && cd --- .bashrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.bashrc b/.bashrc index 57510b2..74c24bd 100644 --- a/.bashrc +++ b/.bashrc @@ -261,6 +261,11 @@ ce() { ${BACKGROUND_EDITOR} . } +mc() { + [[ "$#" -lt 1 ]] && return 1 + mkdir -p "$@" && cd "$1" +} + # bash completion with with_project and functions using it _with_project() { local CDPATH; CDPATH="$(project_dirs):{$CDPATH}"