diff options
| author | Jacob McDonnell <jacob@simplelittledream.com> | 2022-07-14 19:09:06 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@simplelittledream.com> | 2022-07-14 19:09:06 -0400 |
| commit | ed4daf7429bf2580118aad87b8f3e2011efed7ec (patch) | |
| tree | 82f9d8ed68de119e5777f5ecfae9df4a92fe92b3 /.config/shells/cpwdrc | |
Initial commit
Diffstat (limited to '.config/shells/cpwdrc')
| -rwxr-xr-x | .config/shells/cpwdrc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.config/shells/cpwdrc b/.config/shells/cpwdrc new file mode 100755 index 0000000..d3b9ec4 --- /dev/null +++ b/.config/shells/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 +' +} |
