dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit a85681e237a539da9933b0a8615fa8205bd11976
parent e15644b086c0440a26073532ef4638e16bdfa3fe
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon,  1 Apr 2019 13:26:41 +0200

Fix online paper search

Diffstat:
Mbin/articlesearch | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/articlesearch b/bin/articlesearch @@ -4,10 +4,10 @@ set -e browser=${BROWSER:-firefox} dir="$HOME/articles" -choice="$dir/$(find "$dir" -type f | sed "s|$dir/||" | dmenu_themed -i -l 10 -p "Search publications:")" || exit 1 +choice="$(find "$dir" -type f | sed "s|$dir/||" | dmenu_themed -i -l 10 -p "Search publications:")" || exit 1 -if [ -f "$choice" ]; then - xdg-open "$choice" +if [ -f "$dir/$choice" ]; then + xdg-open "$dir/$choice" else $browser "https://scholar.google.com/scholar?q=$choice" fi