From e956b8955ea79035a134cab22a0ca7e0e8cd7ab7 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Mon, 10 Mar 2025 16:42:38 +0100 Subject: [PATCH] zsh: Remove chpwd-readme hook The hook was never added since the `functions` array was misspelled. I fixed that and left it turned on the last few days and absolutely hate it. No idea why I ever thought that this could be nice. --- .config/zsh/zshrc.d/40-functions.zsh | 15 --------------- .config/zsh/zshrc.d/45-hooks.zsh | 4 ---- 2 files changed, 19 deletions(-) delete mode 100644 .config/zsh/zshrc.d/45-hooks.zsh diff --git a/.config/zsh/zshrc.d/40-functions.zsh b/.config/zsh/zshrc.d/40-functions.zsh index d2d7d48..881539d 100644 --- a/.config/zsh/zshrc.d/40-functions.zsh +++ b/.config/zsh/zshrc.d/40-functions.zsh @@ -459,21 +459,6 @@ create_venv() { fi } -# Open READMEs in a pager when going into a directory that contains one. -# See 45-hooks.zsh -_page_readme_chpwd_handler() { - local readme - local -a readmes=(README.md README.txt README Readme.md Readme.txt Readme - readme.md readme.txt readme) - - for readme in "$readmes[@]"; do - [[ -e "$readme" ]] || continue - - ${PAGER:-less} "$readme" - break - done -} - # I sometimes find `pgrep` not matching the processes I am searching for, but # `ps aux | grep ...` did not disappoint yet. psgrep() { diff --git a/.config/zsh/zshrc.d/45-hooks.zsh b/.config/zsh/zshrc.d/45-hooks.zsh deleted file mode 100644 index 15fbe96..0000000 --- a/.config/zsh/zshrc.d/45-hooks.zsh +++ /dev/null @@ -1,4 +0,0 @@ -# vim: ft=zsh - -(( ! $+function[_page_readme_chpwd_handler] )) \ - || add-zsh-hook chpwd _page_readme_chpwd_handler