From: martin f. krafft Date: Wed, 21 Sep 2022 10:16:15 +0000 (+0200) Subject: provide a new shortcut to list files in target dir by time X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/bbc6ef11c56f5a72285ef5ac88b0d130d3d4bb21?ds=sidebyside provide a new shortcut to list files in target dir by time --- 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