To show all zsh configuration as it is executed, you can use the following command:
setopt verbose
This command will print each command as it is executed, including any configuration files that are sourced. If you want to save the output to a file, you can use the following command:
setopt verbose
exec > >(tee /path/to/logfile)
exec 2>&1
This will save the output to a file at the specified path and also print it to the console.
Note that this will print a lot of output, so it may be helpful to filter it using grep or another tool.
Source: [1]
Citations: [1] https://unix.stackexchange.com/questions/117331/in-zsh-how-can-i-dump-all-configuration [2] https://superuser.com/questions/232457/zsh-output-whole-history [3] https://www.sitepoint.com/zsh-tips-tricks/ [4] https://stackoverflow.com/questions/44799445/show-all-sourced-files-in-zsh [5] https://askubuntu.com/questions/483927/reset-zsh-config [6] https://scriptingosx.com/2019/06/moving-to-zsh-part-2-configuration-files/
To show all zsh configuration as it is executed, you can use the following command:
setopt verbose
This command will print each command as it is executed, including any configuration files that are sourced. If you want to save the output to a file, you can use the following command:
setopt verbose exec > >(tee /path/to/logfile) exec 2>&1
This will save the output to a file at the specified path and also print it to the console.
Note that this will print a lot of output, so it may be helpful to filter it using grep or another tool.
Source: [1]
Citations: [1] https://unix.stackexchange.com/questions/117331/in-zsh-how-can-i-dump-all-configuration [2] https://superuser.com/questions/232457/zsh-output-whole-history [3] https://www.sitepoint.com/zsh-tips-tricks/ [4] https://stackoverflow.com/questions/44799445/show-all-sourced-files-in-zsh [5] https://askubuntu.com/questions/483927/reset-zsh-config [6] https://scriptingosx.com/2019/06/moving-to-zsh-part-2-configuration-files/
save it to a file but don’t show it in the console
To save the output of the zsh configuration as it is executed to a file but not show it in the console, you can use the following command:
setopt verbose exec > /path/to/logfile 2>&1
This command will save the output to a file at the specified path and not print it to the console. The
2>&1
redirects the standard error output to the same file as the standard output.If you want to stop logging, you can use the following command:
setopt verbose exec >/dev/null 2>&1
This command will redirect both standard output and standard error to
/dev/null
, which discards the output.Source: [1]
Citations: [1] https://superuser.com/questions/152574/keeping-my-zsh-or-bash-profile-synced-up-on-all-my-machines [2] https://github.com/ohmyzsh/ohmyzsh/issues/6045 [3] https://www.sitepoint.com/zsh-tips-tricks/ [4] https://wilon.github.io/easy-markdown-page/oh-my-zsh.html [5] https://unix.stackexchange.com/questions/532548/how-do-i-apply-the-changes-to-the-zshrc-file-after-editing-it [6] https://www.baeldung.com/linux/zsh-configuration-files