Skip to content

Commit 7c47efa

Browse files
author
☈ king
committed
...toggle_zsh_init_echos (for verifying startup)
1 parent def307c commit 7c47efa

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.zsh/rc/_toggle_zsh_init_echos

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
_toggle_zsh_init_echos() {
2-
# TODO:
3-
# toggle creation of ~/.zsh/{...}/_echo to contain:
4-
# echo -In $0
5-
}
1+
#!/bin/zsh
2+
...toggle_zsh_init_echos() {(
3+
set -xe
4+
[ -d ~/.zsh ]
5+
subdirs=(.zsh/env .zsh/profile .sh .zsh/rc .zsh/login)
6+
if [ -e ~/.zsh/env/_echo ]; then
7+
for n in $subdirs; do
8+
rm ~/$n/_echo || true
9+
done
10+
else
11+
for n in $subdirs; do
12+
echo 'echo "+ In $0"' >| ~/$n/_echo
13+
done
14+
fi
15+
)}

0 commit comments

Comments
 (0)