From 46da4a617dd1f53f9b44a991b382fb1d83f96bda Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Fri, 10 May 2024 13:19:08 +0200 Subject: [PATCH] zsh:alias: Disable CORRECT_ALL for mkdir It's really annoying if it tries to correct me when I create a new directory that is named similar to an existing one. Group together aliases that add a precommand modifier. Since `mkdir` receives the `-p` flag already via `add_flags` the `md` alias can directly alias to `mkdir` instead. --- .config/zsh/zshrc.d/30-alias.zsh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.config/zsh/zshrc.d/30-alias.zsh b/.config/zsh/zshrc.d/30-alias.zsh index 34a904e..338f7d0 100644 --- a/.config/zsh/zshrc.d/30-alias.zsh +++ b/.config/zsh/zshrc.d/30-alias.zsh @@ -87,7 +87,7 @@ fi alias cd..='cd ..' alias cl='() { cd "$@" && ls }' alias rd='rmdir' - alias md='mkdir -p' + alias md='mkdir' alias o='xdg-open' alias pdf2t{e,}xt='pdftotext' alias battery='cat /sys/class/power_supply/BAT0/capacity' @@ -127,13 +127,15 @@ fi )" gpg' # Use a reasonable time format alias date='env LC_TIME=tk_TM date' - # Globbing is annoying when using zmv - alias zmv='noglob zmv' # List human readable sizes in order alias sizes='du -sch * | sort -h' # Count number of occurrences for every line in stdin alias count='sort | uniq -c | sort -n' +# Precommand modifiers + alias mkdir='nocorrect mkdir' + alias zmv='noglob zmv' + # Helper functions for this file. Are `unfunction`ed at the end. is_exec() { (( $# > 0 )) || return 1