diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-12 21:13:48 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-12 21:13:48 +0200 |
commit | 6481ecbdb7c5a5f611d0a1d6e29396520c233298 (patch) | |
tree | 68a42fdc3496e9b0fc0a71f1cfeddbf6b4ccbecc /bin/guiscripts/dmpdf | |
parent | c29c46b771301318e5e7a1d533a1eda21b7feec3 (diff) |
made dmpdf posix compliant
Diffstat (limited to 'bin/guiscripts/dmpdf')
-rwxr-xr-x | bin/guiscripts/dmpdf | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/guiscripts/dmpdf b/bin/guiscripts/dmpdf index e8d4601..56356d7 100755 --- a/bin/guiscripts/dmpdf +++ b/bin/guiscripts/dmpdf @@ -6,9 +6,10 @@ choice="$(\ sed 's|^/home/aluc|\~| ; s|\([^/]\)[^/]*/|\1/|g' "$tmp" | awk '{printf "%s %s\n", NR ":", $0}' | dmenu -p "pdf:" -l 10 -g 1 -x -i | - grep -oE "^[0-9]+:")" + grep -oE "^[0-9]+:" | + cut -f1 -d:)" if [ -z "$choice" ]; then exit fi -file="$(sed -n "${choice::-1}p" "$tmp")" +file="$(sed -n "${choice}p" "$tmp")" zathura "$file" & |