Use actual return status, not 'local' builtin's.

This commit is contained in:
Sławomir Nizio committed 2011-06-26 00:52:24 +02:00
1 parent 84ace8e8a9
commit 3e103cf8a5
1 file changed
+6 -3
+6 -3
View File
@@ -37,7 +37,8 @@ _z() {
[ "$*" = "$HOME" ] && return
# maintain the file
local tempfile="$(mktemp $datafile.XXXXXX)" || return
local tempfile
tempfile="$(mktemp $datafile.XXXXXX)" || return
awk -v path="$*" -v now="$(date +%s)" -F"|" '
BEGIN {
rank[path] = 1
@@ -98,8 +99,10 @@ _z() {
# no file yet
[ -f "$datafile" ] || return
local tempfile="$(mktemp $datafile.XXXXXX)" || return
local cd="$(awk -v t="$(date +%s)" -v list="$list" -v typ="$typ" -v q="$fnd" -v tmpfl="$tempfile" -F"|" '
local tempfile
tempfile="$(mktemp $datafile.XXXXXX)" || return
local cd
cd="$(awk -v t="$(date +%s)" -v list="$list" -v typ="$typ" -v q="$fnd" -v tmpfl="$tempfile" -F"|" '
function frecent(rank, time) {
dx = t-time
if( dx < 3600 ) return rank*4