aboutsummaryrefslogtreecommitdiff
path: root/ctct.in
diff options
context:
space:
mode:
authorEinhard Leichtfuß <alguien@respiranto.de>2018-12-25 17:21:08 +0100
committerEinhard Leichtfuß <alguien@respiranto.de>2018-12-25 17:23:27 +0100
commit72cd558d5d6c4965bb35ed1f9175a4528421ad7a (patch)
tree07bb53c3b8c83d9eac88f24aa746a36573913397 /ctct.in
parent0dd0716c761e328292bf8aac1b15edbdc4f73d2e (diff)
Fix --search-by-data and rename its bash function
Diffstat (limited to 'ctct.in')
-rw-r--r--ctct.in5
1 files changed, 2 insertions, 3 deletions
diff --git a/ctct.in b/ctct.in
index 44c271a..e1cad6b 100644
--- a/ctct.in
+++ b/ctct.in
@@ -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