tv bash-fzf-history: show timestamp
This commit is contained in:
parent
6cfbc67cb2
commit
c1bd2a0851
@ -35,8 +35,9 @@ with import <stockholm/lib>;
|
|||||||
__fzf_history__() (
|
__fzf_history__() (
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
result=( $(
|
result=( $(
|
||||||
HISTTIMEFORMAT= history |
|
HISTTIMEFORMAT=$'\e[38;5;244m%Y-%m-%dT%H:%M:%S\e[m ' history |
|
||||||
FZF_DEFAULT_OPTS="${toString [
|
FZF_DEFAULT_OPTS="${toString [
|
||||||
|
/* sh */ "--ansi"
|
||||||
/* sh */ "--tac"
|
/* sh */ "--tac"
|
||||||
/* sh */ "--sync"
|
/* sh */ "--sync"
|
||||||
/* sh */ "-n2..,.."
|
/* sh */ "-n2..,.."
|
||||||
@ -51,13 +52,15 @@ with import <stockholm/lib>;
|
|||||||
/^ *[0-9]/{
|
/^ *[0-9]/{
|
||||||
s/^ *//
|
s/^ *//
|
||||||
s/ \+/\n/;# index
|
s/ \+/\n/;# index
|
||||||
|
s/ \+/\n/;# date
|
||||||
}
|
}
|
||||||
'
|
'
|
||||||
) )
|
) )
|
||||||
if test -n "$result"; then
|
if test -n "$result"; then
|
||||||
key=''${result[0]}
|
key=''${result[0]}
|
||||||
index=''${result[1]}
|
index=''${result[1]}
|
||||||
command=''${result[2]}
|
date=''${result[2]}
|
||||||
|
command=''${result[3]}
|
||||||
|
|
||||||
echo "$command${mark-prefix}$key"
|
echo "$command${mark-prefix}$key"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user