aboutsummaryrefslogtreecommitdiff
path: root/vis-open
diff options
context:
space:
mode:
Diffstat (limited to 'vis-open')
-rwxr-xr-xvis-open2
1 files changed, 1 insertions, 1 deletions
diff --git a/vis-open b/vis-open
index d516ff1..39b8717 100755
--- a/vis-open
+++ b/vis-open
@@ -35,7 +35,7 @@ DIR=""
[ ! -z "$PATTERN" -a "$PATTERN" != "." -a -d "$PATTERN" ] && DIR="$PATTERN"
while true; do
- SEL=$({ echo ..; ls -1 $PATTERN; } | $VIS_MENU $VIS_MENU_ARGS)
+ SEL=$({ echo ..; ls -1 $PATTERN 2>/dev/null || echo $PATTERN; } | $VIS_MENU $VIS_MENU_ARGS)
[ -z "$SEL" ] && exit 1
[ ! -z "$DIR" ] && SEL="$DIR/$SEL"
if [ -d "$SEL" ]; then