From 960a05363ae9c0b767d57405cfffe9f8a6b021cd Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Sat, 21 Feb 2026 17:11:05 -0500 Subject: refactor(zsh): Restructured common shell files Restructured common shell files to be in a utils directory. Operating System specific files are in the util/OS_NAME/ directories. --- .config/shells/utils/cpwdrc | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 .config/shells/utils/cpwdrc (limited to '.config/shells/utils/cpwdrc') diff --git a/.config/shells/utils/cpwdrc b/.config/shells/utils/cpwdrc new file mode 100755 index 0000000..d3b9ec4 --- /dev/null +++ b/.config/shells/utils/cpwdrc @@ -0,0 +1,10 @@ +#!/bin/sh +## Collapsed Directory +_collapsed_pwd() { + pwd | perl -pe ' + BEGIN { + binmode STDIN, ":encoding(UTF-8)"; + binmode STDOUT, ":encoding(UTF-8)"; + }; s|^$ENV{HOME}|~|g; s|/([^/.])[^/]*(?=/)|/$1|g; s|/\.([^/])[^/]*(?=/)|/.$1|g +' +} -- cgit v1.2.3