Open the selected file then the nexts preserving the order
Signed-off-by: Stacy Harper <contact@stacyharper.net> Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
parent
f37de20a0d
commit
457aa3e1b0
1 changed files with 5 additions and 2 deletions
|
@ -28,7 +28,8 @@ sort_loop() {
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
CHOICES="$(printf %b 'Reload\nClose Menu\nSort By\n../\n*\n'"$(ls -1p $SORT $REVERSE)")"
|
FILES="$(ls -1p $SORT $REVERSE)"
|
||||||
|
CHOICES="$(printf %b 'Reload\nClose Menu\nSort By\n../\n*\n'"$FILES")"
|
||||||
DIR="$(basename "$(pwd)")"
|
DIR="$(basename "$(pwd)")"
|
||||||
TRUNCATED="$(printf %.7s "$DIR")"
|
TRUNCATED="$(printf %.7s "$DIR")"
|
||||||
if [ "$DIR" != "$TRUNCATED" ]; then
|
if [ "$DIR" != "$TRUNCATED" ]; then
|
||||||
|
@ -46,5 +47,7 @@ while true; do
|
||||||
echo "$PICKED" | grep "Reload" && continue
|
echo "$PICKED" | grep "Reload" && continue
|
||||||
[ -d "$PICKED" ] && cd "$PICKED" && continue
|
[ -d "$PICKED" ] && cd "$PICKED" && continue
|
||||||
echo "$PICKED" | grep -E '^[*]$' && sxmo_open.sh -a ./*
|
echo "$PICKED" | grep -E '^[*]$' && sxmo_open.sh -a ./*
|
||||||
[ -f "$PICKED" ] && sxmo_open.sh -a "$PICKED"
|
if [ -f "$PICKED" ]; then
|
||||||
|
echo "$FILES" | sed -n -e "/$PICKED/,\$p" | tr '\n' '\0' | xargs -0 sxmo_open.sh -a
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue