From bbc6ef11c56f5a72285ef5ac88b0d130d3d4bb21 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 21 Sep 2022 12:16:15 +0200 Subject: [PATCH] provide a new shortcut to list files in target dir by time --- .zsh/zshrc/80-zle_inplace_list | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.zsh/zshrc/80-zle_inplace_list b/.zsh/zshrc/80-zle_inplace_list index dc7753d..1f66759 100644 --- a/.zsh/zshrc/80-zle_inplace_list +++ b/.zsh/zshrc/80-zle_inplace_list @@ -27,11 +27,19 @@ _list_inplace() { lastarg="${(Q)bufwords[iword]}" fi [[ -z "${lastarg}" ]] && return 1 - ls -l ${~lastarg:h} - zle end-of-line + ls "$@" ${~lastarg} + zle redisplay + #zle end-of-line } zle -N _list_inplace bindkey '\el' _list_inplace +_list_inplace_time() { + emulate -L zsh + _list_inplace -rt +} +zle -N _list_inplace_time +bindkey '\eL' _list_inplace_time + # vim:ft=zsh -- 2.39.2