diff options
Diffstat (limited to 'bin/extra/gdbcore')
| -rwxr-xr-x | bin/extra/gdbcore | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/extra/gdbcore b/bin/extra/gdbcore index 3364ce8..69b1a64 100755 --- a/bin/extra/gdbcore +++ b/bin/extra/gdbcore @@ -23,10 +23,10 @@ coredir=/var/lib/systemd/coredump  # Temporary file listing core files location, later used as location for the corefile  tmp="$(mktemp)" +  if [ "$2" = "-r" ]; then -    recent="$(find "$coredir" -name 'core.assert*' -printf '%Ts %f\n' | -        sort -n | -        head -n 1 | +    recent="$(find "$coredir" -name "core.${prog##*/}*" -printf '%Ts %f\n' | +        sort -n -r | head -n 1 |          cut -f 2- -d' ')"      corefile="$coredir"/"$recent"  else @@ -39,7 +39,7 @@ else          -e 's/\.[0-9]\+\.[0-9a-f]\+\.[0-9]\+\.[0-9]\+\.zst / /' \          "$tmp" |          awk '{print NR ".", "[" $3,$2"]", $1}' |  -        sort -k 2 -k 3 -r | +        sort -r -k 3 -k 2 |          fzf -0 --with-nth=2..)"      if [ -z "$choice" ]; then          rm "$tmp"  | 
