27 lines
545 B
Bash
Executable File
27 lines
545 B
Bash
Executable File
#!/bin/sh
|
|
|
|
## crappy script to browse and open files in different scenarios ##
|
|
## depends on vi-nucke.sh / vi-nuke from @Visone_Selektah ##
|
|
# open.sh by @root_informatica.
|
|
|
|
[ -t 0 ] && MENU="fzy" \
|
|
|| MENU="xmenu.sh"
|
|
|
|
while true; do
|
|
# file/directory target.
|
|
TARGET=$(ls | $MENU)
|
|
# if target is a directory.
|
|
if [ -d "$TARGET" ]; then
|
|
# move to it (Obviously if target is ".." it goes back a directory)
|
|
cd "$TARGET"
|
|
|
|
else # if target is a file
|
|
# vi-nuke will try to open it.
|
|
vi-nuke.sh "$TARGET"
|
|
break
|
|
fi
|
|
done
|
|
|
|
|
|
|