tv bash-fzf-history: support unknown timestamps
This commit is contained in:
parent
c1bd2a0851
commit
0b60d5da16
@ -35,7 +35,12 @@ with import <stockholm/lib>;
|
|||||||
__fzf_history__() (
|
__fzf_history__() (
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
result=( $(
|
result=( $(
|
||||||
|
# To add "unknown timestamps" to each line of the history:
|
||||||
|
# sed -i '/^#[0-9]/{n;b};s/^/#1\n/' "$HISTFILE"
|
||||||
HISTTIMEFORMAT=$'\e[38;5;244m%Y-%m-%dT%H:%M:%S\e[m ' history |
|
HISTTIMEFORMAT=$'\e[38;5;244m%Y-%m-%dT%H:%M:%S\e[m ' history |
|
||||||
|
${pkgs.gnused}/bin/sed '
|
||||||
|
s/\(\x1b\[[0-9;]*\)244m1970-[0-9T:-]*/\1237m????-??-??T??:??:??/
|
||||||
|
' |
|
||||||
FZF_DEFAULT_OPTS="${toString [
|
FZF_DEFAULT_OPTS="${toString [
|
||||||
/* sh */ "--ansi"
|
/* sh */ "--ansi"
|
||||||
/* sh */ "--tac"
|
/* sh */ "--tac"
|
||||||
|
Loading…
Reference in New Issue
Block a user