Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### NAME:
- reporter
- ### SYNOPSIS:
- ```bash
- source /path/to/reporter [all | aliases | bindings | completion | functions |
- limits | options | variables | zstyles]
- ```
- ### DESCRIPTION:
- `reporter` prints your current environment variables, shell
- variables, limits, completion settings, and option settings to
- stdout in the form of a script.
- If you run into a zsh bug, someone can source the output script to
- recreate most of the environment under which you were working.
- **IMPORTANT**: "_source_" this script, don't try to run it directly.
- Otherwise it won't report the settings for your current shell session.
- ### OPTIONS:
- All command-line options can be abbreviated.
- **aliases** prints only `aliases`.
- **bindings** prints only`bindkey` commands.
- **completion** prints only`compctl` commands.
- **functions** prints`autoload` commands or actual functions.
- **limits** prints`limit` commands for things like cputime, etc.
- **modules** prints`zmodload` commands.
- **options** prints`setopt` commands.
- **variables** prints both shell and environment variables.
- **zstyles** prints`zstyle` commands
- **all** tries to find every useful setting under your shell.
- This is the default, and it's the same as typing all of the above options on the command line.
- ### CAVEATS:
- Assumes that you have the following programs in your search path:
- ``` awk, cut, echo, grep, sed, sort```
- Assumes that your C preprocessor lives in /lib/cpp or /usr/ccs/lib/cpp.
- Uses (and unsets) variables beginning with `reporter_`.
- Won't work for versions of zsh that are older than 3.1.3 or so.
- ### RESTRICTIONS:
- > DON'T: pretend you wrote it, sell it, or blame me if it breaks.
- > DO: as ye will an' ye harm none.
- > --Wiccan saying, I think
- ### BUGS:
- I'm sure there are more than a few. To be safe, run `zsh -f` before
- sourcing the output from this script. If you have `screen`, you may
- want to use that, too; I hammered my terminal settings beyond repair
- when using an early version, and "`screen`" saved me from having to
- login on another terminal.
- ### HISTORY:
- The name was ripped off from the `Emacs` "`reporter.el`" function.
- The idea came from a mail message to the ZSH mailing list:
Add Comment
Please, Sign In to add comment