use subshell
This commit is contained in:
9
bin/open
9
bin/open
@ -1,9 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
FILE=$(find -type f -maxdepth 5 | dmenu -c -i -l 10 -p "path to open")
|
FILE=$(find -maxdepth 5 -type f | dmenu -c -i -l 10 -p "path to open")
|
||||||
|
|
||||||
# try to execute
|
if ( ./"$FILE" ); then
|
||||||
./"$FILE"&
|
exit
|
||||||
|
else
|
||||||
if [[ $? == 1 ]]; then
|
|
||||||
xdg-open "$FILE"
|
xdg-open "$FILE"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user