summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2018-01-10 17:31:15 +0100
committerUrbain Vaes <urbain@vaes.uk>2018-01-10 17:44:10 +0100
commit93a8f4479e0e61a153239dc15fe8b0e42979870c (patch)
treebad2b729654e0f216d5f52fab990c077a6c0e0be /bin
parentb63d5389cfca88ac1da44ebcff3139f420dd72f3 (diff)
Sort references by time
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bin/references2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/bin/references b/bin/bin/references
index 209c9f9..93ef5f4 100755
--- a/bin/bin/references
+++ b/bin/bin/references
@@ -1,5 +1,5 @@
#!/bin/bash
REF_DIR="$HOME/phd/references"
-PDF=$(find $REF_DIR -regex ".*.\(pdf\|djvu\|PDF\|ps\)" -printf "%P\n")
+PDF=$(find $REF_DIR -regex ".*.\(pdf\|djvu\|PDF\|ps\)" -printf "%C@ %P\n" | sort | tac | cut -d' ' -f2-)
TARGET=$(echo "${PDF//"$REF_DIR/"/}" | dmenu -i -p "Open File:")
[[ -n $TARGET ]] && exec zathura "$REF_DIR/$TARGET"