summaryrefslogtreecommitdiff
path: root/bin/hstow
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-11-13 09:46:35 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-11-13 09:46:35 -0700
commitf45323a276a39a3f52a9eb491d965a1d34a1be22 (patch)
tree2384570435fb797ea2c29416a08fdb8b5a531626 /bin/hstow
parent2889dbb40b5891309861d79d20e16288d7fa12a9 (diff)
downloaddotfiles-f45323a276a39a3f52a9eb491d965a1d34a1be22.tar.gz
hstow: strip leading whitespace from one case of output from wc(1)
Thanks to Mike Lee Williams for reporting the problem.
Diffstat (limited to 'bin/hstow')
-rwxr-xr-xbin/hstow2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/hstow b/bin/hstow
index f05f0aaf..8fbec796 100755
--- a/bin/hstow
+++ b/bin/hstow
@@ -131,7 +131,7 @@ stow () {
unstow () {
cd "$HOME"
- dir_pat="^.$(echo $DIR | cut -c$(echo $HOME | wc -m)-)/"
+ dir_pat="^.$(echo $DIR | cut -c$(echo $HOME | wc -m | tr -d ' ')-)/"
for file in $(find . -type l ! -name . ! -name "$cchars" \
| grep -v "$dir_pat"); do
if readlink "$file" | grep -Eq '^(\.\./)*\.STOW/'"$NAME/"; then