qutebrowser: Fix open downloads script for spaces
Fixed the 'open downloads' userscript to work correctly for files with spaces in them.
This commit is contained in:
parent
08a46ed691
commit
701c5bbcfc
1 changed files with 36 additions and 36 deletions
|
@ -16,7 +16,7 @@
|
|||
# see the recent downloads, just press "sd".
|
||||
#
|
||||
# Thorsten Wißmann, 2015 (thorsten` on Libera Chat)
|
||||
# Refactored to work with bemenu by Marty Oehme, 2021 (@martyo@matrix.org on Matrix)
|
||||
# Marty Oehme, 2021 (@martyo@matrix.org on Matrix), refactored to work with bemenu
|
||||
# Any feedback is welcome!
|
||||
|
||||
set -e
|
||||
|
@ -73,7 +73,7 @@ if ! command -v "${ROFI_CMD}" >/dev/null; then
|
|||
fi
|
||||
|
||||
crop-first-column() {
|
||||
cut -d' ' -f2
|
||||
cut -d' ' -f2-
|
||||
}
|
||||
|
||||
ls-files() {
|
||||
|
@ -91,9 +91,9 @@ if [ "${#entries[@]}" -eq 0 ]; then
|
|||
die "Download directory »${DOWNLOAD_DIR}« empty"
|
||||
fi
|
||||
|
||||
line=$(printf '%s\n' "${entries[@]}" |
|
||||
crop-first-column |
|
||||
$ROFI_CMD "${ROFI_ARGS[@]}") || true
|
||||
line=$(printf '%s\n' "${entries[@]}" \
|
||||
| crop-first-column \
|
||||
| $ROFI_CMD "${ROFI_ARGS[@]}") || true
|
||||
if [ -z "$line" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue