commit 86762ff38d78b3d501ce69af5800af13d5dea887
parent 0b98e5cd16fbe5b4ee26597f3e6a7cccb1f0b8bc
Author: Claudio Alessi <smoppy@gmail.com>
Date: Thu, 21 Jan 2016 12:50:52 +0100
[browse] Fix opening binary files.
Replace the -F flag of ls(1) with -p. The script only needs to check for the
trailing slash, other file type symbols was not handled thus making files
ending with '*' (for binaries) non-existent. This commit resolves the problem
using the -p flag which *only* append the trailing slash to directories
entries.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/browse b/src/browse
@@ -5,7 +5,7 @@ target="$1"
[ -z "$target" ] && target="$(realpath .)"
while true; do
- sel="$(ls -1aF "$target" |grep -v '^\.\/$' | dmenu -p "$target" -l 25)"
+ sel="$(ls -1a "$target" |grep -v '^\.\/$' | dmenu -p "$target" -l 25)"
ec=$?
[ "$ec" -ne 0 ] && exit $ec