dotfiles

personal dotfiles
git clone anongit@rnpnr.xyz:dotfiles.git
Log | Files | Refs | Feed | Submodules

Commit: f700c9613bc5e43b2b7a5ef6f9eb6724fc313850
Parent: 7dd9be4cc8c66b131cf973230d67c5459f0e2c2b
Author: 0x766F6964
Date:   Wed, 30 Dec 2020 11:01:04 -0700

.kshrc: add a function to remove windows line endings (
)

they are ugly and waste disk space

Diffstat:
M.kshrc | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/.kshrc b/.kshrc @@ -76,6 +76,14 @@ rmimg() { done } +fix_line_endings() { + tmpfile=$(mktemp) + for file; do + sed s::: "$file" >| "$tmpfile" + mv "$tmpfile" "$file" + done +} + if [ $UNAME == "OpenBSD" ]; then alias dhclient='doas /sbin/dhclient' alias ifconfig='doas /sbin/ifconfig'