apps:zsh
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
apps:zsh [2014-06-28 14:56] – [zshrc] jens | apps:zsh [2020-05-09 17:16] (current) – New zshrc for git branch jens | ||
---|---|---|---|
Line 5: | Line 5: | ||
Of course this shell needs some configuring and finetuning like everything else. That's why I have prepared my own configuration files for you. | Of course this shell needs some configuring and finetuning like everything else. That's why I have prepared my own configuration files for you. | ||
- | For more information about the Z-Shell you should visit its [[http:// | + | For more information about the Z-Shell you should visit its [[http:// |
===== The configuration files ===== | ===== The configuration files ===== | ||
Line 15: | Line 15: | ||
You'll find this file in either ''/ | You'll find this file in either ''/ | ||
- | Everything within this file is executed at login. Mine looks like this; maybe parts of it will be useful to you (" | + | Everything within this file is executed at login. Mine looks like this; maybe parts of it will be useful to you (" |
<file bash zlogin> | <file bash zlogin> | ||
- | linux_logo | + | linuxlogo -u -y |
echo | echo | ||
/ | / | ||
- | echo -e " | ||
- | uptime | ||
echo -e "\nIP Information\n--------------" | echo -e "\nIP Information\n--------------" | ||
- | /sbin/ifconfig|grep -v " | + | /bin/ip address show|awk '/ |
- | / | + | |
echo -e " | echo -e " | ||
df -h -x tmpfs | df -h -x tmpfs | ||
- | echo | + | echo</ |
- | </ | + | |
==== zlogout ==== | ==== zlogout ==== | ||
Line 41: | Line 37: | ||
You'll find this file in either ''/ | You'll find this file in either ''/ | ||
- | This file is similar to ''/ | + | This file is similar to ''/ |
- | + | ||
- | . / | + | |
- | + | ||
- | Be careful with, e.g., any prompt definitions that may be in there! | + | |
==== zshenv ==== | ==== zshenv ==== | ||
You'll find this file in either ''/ | You'll find this file in either ''/ | ||
Line 55: | Line 46: | ||
You'll find this file in either ''/ | You'll find this file in either ''/ | ||
- | This is the main configuration file of the Z-Shell and contains the major part of the configuration. The file is too long to quote here, please feel free to {{: | + | <WRAP 50% round download> |
+ | {{wiki: | ||
+ | Size: 2,0 kB | ||
+ | </ | ||
+ | |||
+ | This is the main configuration file of the Z-Shell and contains the major part of the configuration. The file is too long to quote here, please feel free to download it. Also, it contains quite a lot of control sequences for the colours which would get lost during copy/paste. | ||
The file contains two sections, the upper is suitable for a system-wide configuration as it sets some options (umask and prompt color) depending on whether you are root or not. Of course you can choose to ignore that and use that configuration for yourself only (i.e. only settings for non-root will be activated). | The file contains two sections, the upper is suitable for a system-wide configuration as it sets some options (umask and prompt color) depending on whether you are root or not. Of course you can choose to ignore that and use that configuration for yourself only (i.e. only settings for non-root will be activated). | ||
- | The lower part is suitable for either your personal configuration or as a syste-wide configuration, | + | The lower part is suitable for either your personal configuration or as a system-wide configuration, |
- | + | ||
- | <WRAP download> | + | |
- | {{wiki: | + | |
- | Size: 1,8 kB | + | |
- | </ | + | |
This file will give you these options (amongst others): | This file will give you these options (amongst others): | ||
- | * A nice colored prompt which tells you user, hostname, PTY, path and time. The color is mainly red when root and green when you are working as user.\\ A colored prompt is also very useful when scrolling in your terminal or console history to distinguish the output from what you typed! | + | * A nice colored prompt which tells you user, hostname, PTY (if root), [[git]] branch (if user), path and time. The color is mainly red when root and green when you are working as user.\\ A colored prompt is also very useful when scrolling in your terminal or console history to distinguish the output from what you typed! |
* A umask based on UID as well (less strict as user). | * A umask based on UID as well (less strict as user). | ||
* Nice and useful dircolors, aliases and environment variables. | * Nice and useful dircolors, aliases and environment variables. | ||
Line 75: | Line 66: | ||
* Updates of the terminal title w/ either username and hostname (when you are at a prompt) or the currently running command (when running a command). | * Updates of the terminal title w/ either username and hostname (when you are at a prompt) or the currently running command (when running a command). | ||
* An example of how to learn a specific filetype extension for a specific command when using tab-completion. E.g. if you type " | * An example of how to learn a specific filetype extension for a specific command when using tab-completion. E.g. if you type " | ||
+ | |||
+ | ===== History ===== | ||
+ | The '' | ||
+ | |||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | All history entries are always numbered. Note that human readable timestamps only work with the extended history enabled. |
apps/zsh.txt · Last modified: 2020-05-09 17:16 by jens