From 9a01f1b0800173985dcdbf1e0864aad33ba514ad Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Wed, 12 Feb 2014 13:27:23 -0600 Subject: [PATCH] Sort lexicographically between all available subfiles, not just per directory --- bash-config/common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bash-config/common b/bash-config/common index 1ddb2f0..23a4a5a 100644 --- a/bash-config/common +++ b/bash-config/common @@ -16,8 +16,8 @@ then [ -d "${HOME}/.${_self}.d/" ] && echo "${HOME}/.${_self}.d/" ) | while read _path do - find ${_path} -type f | sort - done | sed -e 's/^/source /; s/$/;/' + find ${_path} -type f | sed -e "s/[\\']/'\\\&'/g" -e 's#^'"${_path}"'\(.*\)$#\1 source '\''&'\'';#' + done | LC_ALL=C sort -t " " -k 1 | sed -e 's/^.* \(source \)/\1/' )" __BASH_CONFIG_DEPTH=$(( ${__BASH_CONFIG_DEPTH} - 1 )) -- 2.42.0