mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-12-23 11:12:48 +01:00
Rename zsh_exports to zshenv.
zshenv is sourced by every zsh (not only interactive sessions, scripts too). Content of this file is what I probably want scripts to use too. Scripts probably don't things like aliases.
This commit is contained in:
parent
084dda139a
commit
802c0da6af
6
README
6
README
@ -15,11 +15,11 @@ YOU RAN INSTALLATION SCRIPT.
|
|||||||
|
|
||||||
Notices:
|
Notices:
|
||||||
zshrc: I have uncommented line 42.
|
zshrc: I have uncommented line 42.
|
||||||
zsh_exports: The default editor is nano (line 4).
|
zshenv: The default editor is nano (line 4).
|
||||||
zsh_exports: The default timezone is Europe/Helsinki, line 15. You probably want to change it.
|
zshenv: The default timezone is Europe/Helsinki, line 15. You probably want to change it.
|
||||||
zshrc: autocd is disabled (commented in near end of zshrc REASON: It doesn't seem to work with Mac OS X, and I have one MacBook running it here..
|
zshrc: autocd is disabled (commented in near end of zshrc REASON: It doesn't seem to work with Mac OS X, and I have one MacBook running it here..
|
||||||
zshrc: Lines 123-125 expect you to have tmux installed.
|
zshrc: Lines 123-125 expect you to have tmux installed.
|
||||||
zsh_exports: Line 11 makes C as locale. You MUST change this. See line 10 for information about how.
|
zshenv: Line 11 makes C as locale. You MUST change this. See line 10 for information about how.
|
||||||
zshrc: if you have read every notice, comment line 1 in your ~/.zshrc .
|
zshrc: if you have read every notice, comment line 1 in your ~/.zshrc .
|
||||||
|
|
||||||
DISCLAIMER:
|
DISCLAIMER:
|
||||||
|
10
install.sh
10
install.sh
@ -6,9 +6,9 @@ touch ~/.zshrc # Creates .zshrc if you don't have one.
|
|||||||
cat ~/.zshrc > ~/.zshrc.default.backup # Backups your current .zshrc
|
cat ~/.zshrc > ~/.zshrc.default.backup # Backups your current .zshrc
|
||||||
touch ~/.zsh_aliases # Creates .zsh_aliases if you don't have one.
|
touch ~/.zsh_aliases # Creates .zsh_aliases if you don't have one.
|
||||||
cat ~/.zsh_aliases > ~/.zsh_aliases.default.backup # Backups your current .zsh_aliases
|
cat ~/.zsh_aliases > ~/.zsh_aliases.default.backup # Backups your current .zsh_aliases
|
||||||
touch ~/.zsh_exports # Creates .zsh_exports (this is my idea, I am surprised if you have it.)
|
touch ~/.zshenv # Creates .zshenv
|
||||||
cat ~/.zsh_exports > ~/.zsh_exports.default.backup # Backs up .zsh_exports.
|
cat zshenv > ~/.zshenv.default.backup # Backs up .zsh_exports.
|
||||||
touch ~/.zsh_functions # I am surprised if you have this, see above.
|
touch ~/.zsh_functions
|
||||||
cat ~/.zsh_functions > ~/.zsh_functions.default.backup # Backs up .zsh_functions .
|
cat ~/.zsh_functions > ~/.zsh_functions.default.backup # Backs up .zsh_functions .
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
echo "Installing zsh_aliases."
|
echo "Installing zsh_aliases."
|
||||||
@ -17,8 +17,8 @@ echo "zsh_aliases installed."
|
|||||||
echo "Installing zshrc."
|
echo "Installing zshrc."
|
||||||
cat zshrc > ~/.zshrc
|
cat zshrc > ~/.zshrc
|
||||||
echo "zshrc installed."
|
echo "zshrc installed."
|
||||||
echo "Installing zsh_exports"
|
echo "Installing zshenv"
|
||||||
cat zsh_exports > ~/.zsh_exports
|
cat zshenv > ~/.zshenv
|
||||||
echo "zsh_exports installed."
|
echo "zsh_exports installed."
|
||||||
echo "Installing zsh_functions"
|
echo "Installing zsh_functions"
|
||||||
cat zsh_functions > ~/.zsh_functions
|
cat zsh_functions > ~/.zsh_functions
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
echo "Restoring default files..."
|
echo "Restoring default files..."
|
||||||
cat ~/.zshrc.default.backup > ~/.zshrc
|
cat ~/.zshrc.default.backup > ~/.zshrc
|
||||||
cat ~/.zsh_aliases.default.backup > ~/.zsh_aliases
|
cat ~/.zsh_aliases.default.backup > ~/.zsh_aliases
|
||||||
cat ~/.zsh_exports.default.backup > ~/.zsh_exports
|
cat ~/.zshenv.default.backup > ~/.zshenv
|
||||||
cat ~/.zsh_functions.default.backup > ~/.zsh_functions
|
cat ~/.zsh_functions.default.backup > ~/.zsh_functions
|
||||||
echo "Done! Now you should restart zsh or source files again for default files to affect."
|
echo "Done! Now you should restart zsh or source files again for default files to affect."
|
||||||
|
14
upgrade.sh
14
upgrade.sh
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
echo "Backing up files..."
|
echo "Backing up files..."
|
||||||
touch ~/.zsh_exports
|
touch ~/.zshenv
|
||||||
cat ~/.zsh_exports > ~/.zsh_exports.old.backup
|
cat ~/.zshenv > ~/.zshenv.old.backup
|
||||||
touch ~/.zsh_aliases
|
touch ~/.zsh_aliases
|
||||||
cat ~/.zsh_aliases > ~/.zsh_aliases.old.backup
|
cat ~/.zsh_aliases > ~/.zsh_aliases.old.backup
|
||||||
touch ~/.zsh_functions
|
touch ~/.zsh_functions
|
||||||
@ -12,9 +12,9 @@ echo "Installing new files..."
|
|||||||
cat zsh_aliases > ~/.zsh_aliases
|
cat zsh_aliases > ~/.zsh_aliases
|
||||||
cat zsh_functions > ~/.zsh_functions
|
cat zsh_functions > ~/.zsh_functions
|
||||||
cat zshrc > ~/.zshrc
|
cat zshrc > ~/.zshrc
|
||||||
echo "Not installing zsh_exports, See content of that file:"
|
echo "Not installing zshenv, See content of that file:"
|
||||||
touch ~/.zsh_exports
|
touch ~/.zshenv
|
||||||
echo "-- Start of content of zsh_exports --"
|
echo "-- Start of content of zshenv --"
|
||||||
cat zsh_exports
|
cat zshenv
|
||||||
echo "-- End of content of zsh_exports --"
|
echo "-- End of content of zshenv --"
|
||||||
echo "Installation has been completed. You might now need to source your ~/.zshrc for changes to happen."
|
echo "Installation has been completed. You might now need to source your ~/.zshrc for changes to happen."
|
||||||
|
22
zshenv
Normal file
22
zshenv
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# This file exports everything in my zshrc. Note: This file is not overwritten by scripts.
|
||||||
|
|
||||||
|
# Sets the default editor. I prefer nano to vim and so on, so I want it to be nano. If you don't like terminal based text editors, change "nano" to gedit (Gnome) or Kate (KDE).
|
||||||
|
export EDITOR=nano
|
||||||
|
|
||||||
|
# Sets user specifig PYTHONPATH. Replace 2.X with your Python version. For example with Python 2.7 you replace X with 7.
|
||||||
|
#export PYTHONPATH=$HOME/.packages/lib/python2.X/site-packages
|
||||||
|
|
||||||
|
# Fixes locale problems (for example) when SSHing in with different locale. (Another example: Hailo plugin for supybot gives locale errors, this fixes it.)
|
||||||
|
# Replace "C" with your locale. You can get list of locales by running "locale -a". Replace "C" with your language. For example: fi_FI.utf8 )
|
||||||
|
LC_ALL=C
|
||||||
|
export LC_ALL
|
||||||
|
|
||||||
|
# Sets your timezone. Set in format <Region/City>, or just timezone like UTC.
|
||||||
|
#export TZ="/usr/share/zoneinfo/Europe/Helsinki"
|
||||||
|
|
||||||
|
# Sets PATH. To add another path, add :</path/to/new/path> to string below.
|
||||||
|
# Yes, I know that this isn't exporting, but I don't want PYTHONPATH to be alone here and PATH matches with nature of this file.
|
||||||
|
PATH=$PATH
|
||||||
|
|
||||||
|
# Sets web-browser. Used for one alias.
|
||||||
|
#export BROWSER=lynx
|
2
zshrc
2
zshrc
@ -42,7 +42,7 @@ zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
|||||||
|
|
||||||
# Sources everything.
|
# Sources everything.
|
||||||
source ~/.zsh_aliases
|
source ~/.zsh_aliases
|
||||||
source ~/.zsh_exports
|
source ~/.zshenv
|
||||||
source ~/.zsh_functions
|
source ~/.zsh_functions
|
||||||
|
|
||||||
## DO NOT PUT ANYTHING BELOW THIS LINE OR YOUR CHANGES MAY GET IGNORED BY BASH!
|
## DO NOT PUT ANYTHING BELOW THIS LINE OR YOUR CHANGES MAY GET IGNORED BY BASH!
|
||||||
|
Loading…
Reference in New Issue
Block a user