From 5b7b05140480eb2ac57fd1ddeecb27ea2ba321b3 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Mon, 7 Feb 2022 12:33:20 +0000 Subject: [PATCH] Removes auto-expand --- shells/zsh/includes/auto-expand.zsh | 53 ----------------------------- 1 file changed, 53 deletions(-) delete mode 100644 shells/zsh/includes/auto-expand.zsh diff --git a/shells/zsh/includes/auto-expand.zsh b/shells/zsh/includes/auto-expand.zsh deleted file mode 100644 index dff295c1..00000000 --- a/shells/zsh/includes/auto-expand.zsh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env zsh - -# An array of aliases that should be auto-expanded -typeset -a ealiases -ealiases=( - "mkdir" - "qmv" - "grep" - "cal" - "df" - "docker" - "docker-compose" - "v" - "vim" - "status" - "st" - "checkout" - "ch" - "push" - "pull" - "bb" - "merge" - "mg" - "switch" - "sw" -) - - - - - -# expand any aliases in the current line buffer -function expand-ealias() { - if [[ $LBUFFER =~ "\<(${(j:|:)ealiases})\$" ]]; then - zle _expand_alias - zle expand-word - fi - zle magic-space -} -zle -N expand-ealias - -# Bind the space key to the expand-alias function above, so that space will expand any expandable aliases -bindkey ' ' expand-ealias -bindkey '^ ' magic-space # control-space to bypass completion -bindkey -M isearch " " magic-space # normal space during searches - -# A function for expanding any aliases before accepting the line as is and executing the entered command -expand-alias-and-accept-line() { - expand-ealias - zle .backward-delete-char - zle .accept-line -} -zle -N accept-line expand-alias-and-accept-line