diff options
author | Aditya <bluenerd@protonmail.com> | 2023-02-27 20:04:56 +0530 |
---|---|---|
committer | Aditya <bluenerd@protonmail.com> | 2023-02-27 20:04:56 +0530 |
commit | edc449275b6c04445f58b108ca0937a87c1e8430 (patch) | |
tree | 9fd484d58145b616f29a78857cc0b1c8b1c18f05 /oh-my-zsh/lib/misc.zsh | |
parent | 6f5424ca96c4221ef433f545642669e9c104d0ed (diff) |
add zsh
Diffstat (limited to 'oh-my-zsh/lib/misc.zsh')
-rw-r--r-- | oh-my-zsh/lib/misc.zsh | 35 |
1 files changed, 35 insertions, 0 deletions
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 |