Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Bash environment is automatically install and initialize oh-my-zsh & autojump zsh     - Linux System Getting Started Learning: Repair fatal error openssl aes h no such file or directory (Linux)

- iOS used in the development --UITabBarController tag controller (Programming)

- Nodejs complete installation instructions for Express (Linux)

- Linux System Getting Started Tutorial: Using the Linux common commands (Linux)

- 3 tips Linux command (Linux)

- Linux environment variable settings and save places (Linux)

- iOS GCD multithreading simple to use (Programming)

- MySQL partition table Comments (Database)

- Squid proxy server (Server)

- Udev: Device Manager for Linux Fundamentals (Linux)

- Install Redis 2.6 5.5 32 position CentOS error resolved (Linux)

- ORA-01839 error caused by incorrect system date setting (Database)

- Oracle Data File Management (Database)

- APR for Tomcat installation under Linux (Server)

- Linux process scheduling opportunity (Programming)

- MongoDB uses aggregate, group, match mysql achieve in having (count (1)> 1) features (Database)

- Acquaintance C ++: the most simple C ++ program (Programming)

- Create several practical points of high security PHP site (Linux)

- Linux NFS service fixed ports and firewall configuration (Linux)

- GitLab issued Merge Request return error 500 when the two solutions log (Linux)

 
         
  Bash environment is automatically install and initialize oh-my-zsh & autojump zsh
     
  Add Date : 2018-11-21      
         
         
         
  Linux and Mac system default shell is bash, but the real power should belong to zsh shell, and completely control the bash, is the shell of the ultimate killer, there are many features not bash, but zsh initial configuration is too complicated, popular rate has been low, until a man named Robby Russell guy on github developed oh-my-zsh project, so that we use zsh convenience is greatly improved.

Since the company's computer is windows, toss under cygwin, and installed zsh, so start with a lot of convenience to maintain, and I put autojump projects are integrated together, and finally wrote a script automatic installation, you can automatically from the current bash installation environment Oh-my-zsh, autojump and initialize zsh. Currently only supports Ubuntu, CentOS, Debian.

I gather that this zsh profile online support plugin (git autojump history history-substring-search systemadmin systemd), a detailed program to see the plugin source code ~ .oh-my-zsh / plugins /.

See autojump autojump use of official documents. https://github.com/wting/autojump
history-substring-search Search history bright very strong, strong enough to make you suddenly tongue.
systemadmin SA integrates many commonly used commands.
systemd for centos7 after systemctl streamlining of intelligence.

#! / Bin / bash
#Author: Shanker
#set -x
#set -u
clearhacker
  
echo ""
echo "################################################ ############# "
echo "# Automatically to Install oh-my-zsh and initialize it #"
echo "# Intro: https://github.com/sangrealest/shanker #"
echo "# Author: Shanker #"
echo "################################################ ############# "
echo ""
#if [ `id -u` -ne 0]
#then
# Echo "Need root to run is, try with sudo"
# Exit 1
#fi
function checkOs () {
    if [-f / etc / RedHat-release]
    then
        OS = "CentOS"
    elif [-z! "` cat / etc / issue | grep -i bian` "]
    then
        OS = "Debian"
    elif [-z! "` cat / etc / issue | grep -i ubuntu` "]
    then
        OS = "Ubuntu"
    else
        echo "Not supported OS"
        exit 1
    fi
}
function installSoftware () {
if [ "$ OS" == 'CentOS']
then
    sudo yum -y install zsh git
else
    sudo apt-get -y install zsh git
fi
zshPath = "` which zsh` "
}
function downloadFile () {
    cd ~
    git clone https://github.com/robbyrussell/oh-my-zsh.git ~ / .oh-my-zsh
    git clone https://github.com/joelthelion/autojump.git
    git clone https://github.com/sangrealest/initzsh
}
function installAutojump () {
    cd ~ / autojump
    ./install.py
cat >> ~ / .zshrc << EOF
[[-s ~ / .autojump / Etc / profile.d / autojump.sh]] && source ~ / .autojump / etc / profile.d / autojump.sh
autoload -U compinit && compinit -u
EOF
}
function configZsh () {
    if [-f ".zsh_history"]
    then
        mv .zsh_history {., backup}
    fi
    sudo chsh -s "$ zshPath"
    cp ~ / initzsh / zshrc ~ / .zshrc
}
function main () {
checkOs
installSoftware
downloadFile
configZsh
installAutojump
}
main

If cygwin use zsh, you only need to add a line inside the .bashrc / bin / zsh can.
     
         
         
         
  More:      
 
- GitLab Guide installation under Ubuntu 14.04 (Server)
- Intel Graphics Installer installation on Ubuntu 15.10 (Linux)
- Linux system man help tips (Linux)
- CentOS-based Kickstart automated installation practice (Linux)
- Oracle to create an external table (Database)
- libreadline.so.6: can not open shared object file problem solution (Linux)
- Oracle metadata Reconstruction experiments (Database)
- Django url () function Detailed (Programming)
- Two classic macro definition under Linux (Linux)
- To create a full command line Android Build System (Linux)
- Android Studio 1.0.2 set the memory size (Linux)
- Linux terminal program running in the background (Linux)
- Use Tails 1.4 Linux system to protect the privacy and anonymity (Linux)
- ORA-30926 and MERGE tables empty the temporary occupation problem (Database)
- MongoDB 3.2 to upgrade from 3.0.7 (Database)
- Linux development environment to build and use the directory structure and file --Linux (Linux)
- Linux folder and extract the differential file comparison techniques -rsync Magical (Linux)
- Bash command substitution (Programming)
- Hibernate learning introductory tutorial (Programming)
- C ++ virtual functions Classic Insights (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.