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.
This commit is contained in:
@@ -87,7 +87,7 @@ fi
|
|||||||
alias cd..='cd ..'
|
alias cd..='cd ..'
|
||||||
alias cl='() { cd "$@" && ls }'
|
alias cl='() { cd "$@" && ls }'
|
||||||
alias rd='rmdir'
|
alias rd='rmdir'
|
||||||
alias md='mkdir -p'
|
alias md='mkdir'
|
||||||
alias o='xdg-open'
|
alias o='xdg-open'
|
||||||
alias pdf2t{e,}xt='pdftotext'
|
alias pdf2t{e,}xt='pdftotext'
|
||||||
alias battery='cat /sys/class/power_supply/BAT0/capacity'
|
alias battery='cat /sys/class/power_supply/BAT0/capacity'
|
||||||
@@ -127,13 +127,15 @@ fi
|
|||||||
)" gpg'
|
)" gpg'
|
||||||
# Use a reasonable time format
|
# Use a reasonable time format
|
||||||
alias date='env LC_TIME=tk_TM date'
|
alias date='env LC_TIME=tk_TM date'
|
||||||
# Globbing is annoying when using zmv
|
|
||||||
alias zmv='noglob zmv'
|
|
||||||
# List human readable sizes in order
|
# List human readable sizes in order
|
||||||
alias sizes='du -sch * | sort -h'
|
alias sizes='du -sch * | sort -h'
|
||||||
# Count number of occurrences for every line in stdin
|
# Count number of occurrences for every line in stdin
|
||||||
alias count='sort | uniq -c | sort -n'
|
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.
|
# Helper functions for this file. Are `unfunction`ed at the end.
|
||||||
is_exec() {
|
is_exec() {
|
||||||
(( $# > 0 )) || return 1
|
(( $# > 0 )) || return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user