fish: functions/dotg: Sort the results on basis of time
Idea adapted from https://stackoverflow.com/questions/45500978/vim-fzf-sort-initial-results-on-file-date
This commit is contained in:
parent
5ac754ea99
commit
5ed30a7796
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ function dotg --description 'Generate gstreamer dot graph for selected file'
|
||||||
set dotpath "$GST_DEBUG_DUMP_DOT_DIR"
|
set dotpath "$GST_DEBUG_DUMP_DOT_DIR"
|
||||||
end
|
end
|
||||||
|
|
||||||
find $dotpath -maxdepth 1 -regextype posix-extended -regex ".*\.(dot)" | fzf | read -l result
|
find /tmp/gst-dot -maxdepth 1 -regextype posix-extended -regex ".*\.(dot)" -printf '%T@ %p\n' | sort -k 1 -n -r | fzf | awk -F' ' '{print $2}' | read -l result
|
||||||
|
|
||||||
if test -n "$result"
|
if test -n "$result"
|
||||||
dot -Tsvg "$result" -O
|
dot -Tsvg "$result" -O
|
||||||
|
|
Loading…
Reference in a new issue