diff options
Diffstat (limited to 'home-manager/config/lf/cmds/stripspace')
-rwxr-xr-x | home-manager/config/lf/cmds/stripspace | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/home-manager/config/lf/cmds/stripspace b/home-manager/config/lf/cmds/stripspace deleted file mode 100755 index 65dabc4c..00000000 --- a/home-manager/config/lf/cmds/stripspace +++ /dev/null @@ -1,32 +0,0 @@ -#! /usr/bin/env dash -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH - -files=$(mktmp); -echo "$fx" > $files; - -awk_source=$(mktmp); -cat << OFT > $awk_source -BEGIN {FS=" "} -{for (i=1; i != NF + 1; i++) - if (i == NF) { - parts[i]=tolower(\$i); - } else { - parts[i]=tolower(\$i"_"); - } -} -END {for (i in parts) printf parts[i]} -OFT - -while read -r file; do - dirty_name=$(mktmp) - basename "$file" > $dirty_name; - clean_name=$(awk -f "$awk_source" "$dirty_name"); - - [ -e "$clean_name" ] && die "file \"$clean_name\" already exists!"; - mv "$(cat $dirty_name)" "$clean_name" || die "Move failed"; - lf -remote 'send reload' -done < "$files"; -# vim: ft=sh |