diff options
Diffstat (limited to 'ctct.in')
-rw-r--r-- | ctct.in | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -99,7 +99,7 @@ function main() elif [ "$1" = "-S" ] || \ ( [[ "--search-by-data" =~ ^"$1" ]] && [ ${#1} -ge 13 ] ) then - shift; search_by_content "Found:" "$@"; return $? + shift; search_by_data "Found:" "$@"; return $? elif [ "$1" = "-e" ] || ( [[ "--edit" =~ ^"$1" ]] && [ ${#1} -ge 3 ] ) then test $# -lt 2 && print_error "$exec_name: no entry specified." \ @@ -222,7 +222,7 @@ function search_by_name() # $1: initial success message # ${@:2}: regular expressions -function search_by_content() +function search_by_data() { local msg files regexp ret @@ -233,7 +233,6 @@ function search_by_content() # equally. cd "$datadir" files=( $(list_all || return $RET_ERROR) ) - cd - for regexp in "${@,,}" do |