From edc449275b6c04445f58b108ca0937a87c1e8430 Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 27 Feb 2023 20:04:56 +0530 Subject: add zsh --- oh-my-zsh/lib/misc.zsh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 oh-my-zsh/lib/misc.zsh (limited to 'oh-my-zsh/lib/misc.zsh') diff --git a/oh-my-zsh/lib/misc.zsh b/oh-my-zsh/lib/misc.zsh new file mode 100644 index 0000000..1f63708 --- /dev/null +++ b/oh-my-zsh/lib/misc.zsh @@ -0,0 +1,35 @@ +autoload -Uz is-at-least + +# *-magic is known buggy in some versions; disable if so +if [[ $DISABLE_MAGIC_FUNCTIONS != true ]]; then + for d in $fpath; do + if [[ -e "$d/url-quote-magic" ]]; then + if is-at-least 5.1; then + autoload -Uz bracketed-paste-magic + zle -N bracketed-paste bracketed-paste-magic + fi + autoload -Uz url-quote-magic + zle -N self-insert url-quote-magic + break + fi + done +fi + +## jobs +setopt long_list_jobs + +env_default 'PAGER' 'less' +env_default 'LESS' '-R' + +## super user alias +alias _='sudo ' + +## more intelligent acking for ubuntu users and no alias for users without ack +if (( $+commands[ack-grep] )); then + alias afind='ack-grep -il' +elif (( $+commands[ack] )); then + alias afind='ack -il' +fi + +# recognize comments +setopt interactivecomments -- cgit v1.2.3