diff options
| author | 2026-01-01 20:47:45 -0800 | |
|---|---|---|
| committer | 2026-01-01 20:47:45 -0800 | |
| commit | adc4951c1d2439cc4f84613d6a42af911e9b062d (patch) | |
| tree | df1e14d3771350d08f901bbfcce4d281e79a6a87 /oni/home/config | |
| parent | f6574cb4dcc4fbe60398de1e2281d7d82a8dfe67 (diff) | |
| download | new-dotfiles-adc4951c1d2439cc4f84613d6a42af911e9b062d.tar.gz new-dotfiles-adc4951c1d2439cc4f84613d6a42af911e9b062d.zip | |
zsh: Remove duplicated function
This is also imported as an autoloaded function.
Diffstat (limited to 'oni/home/config')
| -rw-r--r-- | oni/home/config/common.scm | 1 | ||||
| -rw-r--r-- | oni/home/config/zsh/spwd.zsh | 27 |
2 files changed, 0 insertions, 28 deletions
diff --git a/oni/home/config/common.scm b/oni/home/config/common.scm index 7160c14..525a2f2 100644 --- a/oni/home/config/common.scm +++ b/oni/home/config/common.scm @@ -277,7 +277,6 @@ LocalForward 19999 localhost:19999")) ;; Prevent aliases from being expanded before looking up ;; completions. "setopt completealiases\n") - (local-file "zsh/spwd.zsh") (local-file "zsh/guix-environment.zsh"))))) ;; This has to be the first extension because it needs to be added to the ;; configuration last. diff --git a/oni/home/config/zsh/spwd.zsh b/oni/home/config/zsh/spwd.zsh deleted file mode 100644 index 76de8d9..0000000 --- a/oni/home/config/zsh/spwd.zsh +++ /dev/null @@ -1,27 +0,0 @@ -function spwd() { - # From https://stackoverflow.com/a/45336078 - paths=(${(s:/:)PWD}) - - cur_path='/' - cur_short_path='/' - for directory in ${paths[@]} - do - cur_dir='' - for (( i=0; i<${#directory}; i++ )); do - cur_dir+="${directory:$i:1}" - matching=("$cur_path"/"$cur_dir"*/) - if [[ ${#matching[@]} -eq 1 ]]; then - break - fi - done - cur_short_path+="$cur_dir/" - cur_path+="$directory/" - - if [[ $cur_path == $HOME/ ]]; - then cur_short_path='~/' - fi - done - - printf %b "${cur_short_path: : -1}" - echo -} |
