From c1bd2a0851dc163a77699b00759f8ae4aa38a65d Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 5 Feb 2019 11:54:03 +0100 Subject: tv bash-fzf-history: show timestamp --- tv/5pkgs/simple/bash-fzf-history.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tv') diff --git a/tv/5pkgs/simple/bash-fzf-history.nix b/tv/5pkgs/simple/bash-fzf-history.nix index 8b3fe9e5..7b92ea0c 100644 --- a/tv/5pkgs/simple/bash-fzf-history.nix +++ b/tv/5pkgs/simple/bash-fzf-history.nix @@ -35,8 +35,9 @@ with import ; __fzf_history__() ( IFS=$'\n' result=( $( - HISTTIMEFORMAT= history | + HISTTIMEFORMAT=$'\e[38;5;244m%Y-%m-%dT%H:%M:%S\e[m ' history | FZF_DEFAULT_OPTS="${toString [ + /* sh */ "--ansi" /* sh */ "--tac" /* sh */ "--sync" /* sh */ "-n2..,.." @@ -51,13 +52,15 @@ with import ; /^ *[0-9]/{ s/^ *// s/ \+/\n/;# index + s/ \+/\n/;# date } ' ) ) if test -n "$result"; then key=''${result[0]} index=''${result[1]} - command=''${result[2]} + date=''${result[2]} + command=''${result[3]} echo "$command${mark-prefix}$key" else -- cgit v1.2.3