From 9f99ceafd47c211d258174f8840a395ae1b353ca Mon Sep 17 00:00:00 2001 From: druckdev Date: Wed, 29 Dec 2021 17:28:41 +0100 Subject: [PATCH] zsh:keys:cmd-on-enter: Use `ll` instead of `ls` --- .config/zsh/zshrc.d/60-keys.zsh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.config/zsh/zshrc.d/60-keys.zsh b/.config/zsh/zshrc.d/60-keys.zsh index 8bd320b..be17cea 100644 --- a/.config/zsh/zshrc.d/60-keys.zsh +++ b/.config/zsh/zshrc.d/60-keys.zsh @@ -101,19 +101,19 @@ bindkey . rationalize_dots function cmd-on-enter { zle -M "$CMD_ON_ENTER" if [[ -z $BUFFER ]]; then - # Overwrite BUFFER and default to ls - BUFFER="${CMD_ON_ENTER:=ls}" + # Overwrite BUFFER and default to ll + BUFFER="${CMD_ON_ENTER:=ll}" - # Cycle through ls and git status + # Cycle through ll and git status case "$CMD_ON_ENTER" in - ls) + ll) ! git rev-parse &>/dev/null || CMD_ON_ENTER='gs';; gs) - CMD_ON_ENTER='ls';; + CMD_ON_ENTER='ll';; esac else # Reset if other command is executed - CMD_ON_ENTER=ls + CMD_ON_ENTER=ll fi zle accept-line }