From 6fa97078d0c0990a8bd67d87234575da64089301 Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Tue, 6 Sep 2022 23:52:54 -0700 Subject: [PATCH] :memo: Updated xh and ph --- scripts/ph | 4 ++-- scripts/xh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/ph b/scripts/ph index 4be92828..e4bf92fd 100755 --- a/scripts/ph +++ b/scripts/ph @@ -1,11 +1,11 @@ #!/bin/bash source "${HOME}"/.n_hidden -lastarg="${@: -1}" +lastarg=("${@: -1}") search="" for ARG in "${@}" ; do - if [ $ARG == $lastarg ] ; then + if [[ $ARG == "${lastarg[1]}" ]] ; then search+="${ARG}" else search+="${ARG}+" diff --git a/scripts/xh b/scripts/xh index 515e0ef7..57cd3106 100755 --- a/scripts/xh +++ b/scripts/xh @@ -1,11 +1,11 @@ #!/bin/bash source "${HOME}"/.n_hidden -lastarg="${@: -1}" -# echo "lastarg is "${lastarg}"" +lastarg=("${@: -1}") + search="" for ARG in "${@}" ; do - if [ $ARG == $lastarg ] ; then + if [[ $ARG == "${lastarg[1]}" ]] ; then search+="${ARG}" else search+="${ARG}+"