1
0
Fork 0

Make cat-highlight() work with spaces in filenames

This commit is contained in:
tastytea 2022-04-10 03:25:50 +02:00
parent 56fd3d07a8
commit d2d2a166df
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 2 additions and 2 deletions

View File

@ -27,10 +27,10 @@ if [[ -t 1 ]] && [[ -n "${CATOPEN}" || -n "${LESSOPEN}" ]]; then
local -a args
local -a files
for arg in "${@}"; do
for arg in ${@}; do
# Filter out file names
if [[ "${arg[1]}" != "-" ]]; then
files+="${arg}"
files+="'${arg}'"
else
args+="${arg}"
fi