diff --git a/.config/bash/module/Name.sh b/.config/bash/module/Name.sh index b33676c..13aa3c1 100644 --- a/.config/bash/module/Name.sh +++ b/.config/bash/module/Name.sh @@ -215,7 +215,12 @@ function name_music() { process() { # Extract new name. local ext=${target##*.} - local new_name="$(parse_titlecase $(parse_simplify ${target%.*})).${ext}" + + if [[ -d "${target}" ]]; then + local new_name="$(parse_titlecase $(parse_simplify ${target%.*}))" + else + local new_name="$(parse_titlecase $(parse_simplify ${target%.*})).${ext}" + fi # Skip on no change. [[ "${target%/}" = "${new_name}" ]] && return 0