Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Bash environment is automatically install and initialize oh-my-zsh & autojump zsh     - RedHat yum configuration and the prompt (Linux)

- Linux firewall settings instance (Linux)

- To install Emacs under CentOS 6.5 (Linux)

- Ubuntu 15.04 / CentOS 7.0 to set custom boot (Linux)

- To install the latest version of the EPEL on CentOS 5.x or 6.x (Linux)

- Type Linux commands (Linux)

- Linux reserves the rest of the file to delete several (Linux)

- Linux command execution judge sentences -;, &&, || (Linux)

- Using Libreoffice under ubuntu (Linux)

- CentOS / Linux install VNC Server (Linux)

- Migrate Oracle database files to ASM (Database)

- Spark build standalone version cluster (Server)

- Oracle Linux 5.9 configuration Xmanager (Linux)

- expdp reported ORA-39181 Export Processing Method (Database)

- Java Annotation Comments (Programming)

- A brief description of Java 8 new features introduced syntax (Programming)

- Learning Linux coding style (Programming)

- CentOS 5.5 install ntop (Linux)

- How to configure chroot environment in Ubuntu 14.04 (Linux)

- Use mysqldump backup performed MariaDB (Database)

 
         
  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:      
 
- To read the Linux ext3 / ext4 format partitions under Windows system software (Linux)
- configuration ssh without password under Linux (Linux)
- Ubuntu 14.10 How to install office suite Calligra Suite 2.8.7 (Linux)
- Six Ways to view slides can be implemented Android (Programming)
- Android Application Development: an argument between Activity (Programming)
- Git and GitHub use of Eclipse and Android Studio (Programming)
- Cygwin install Python MySQLdb (Linux)
- C / C ++ language usage summary of const (Programming)
- Update GAMIT10.6 command (Linux)
- Installation and configuration under Linux SVN server - Backup - Recovery - Scheduled Tasks (Server)
- About Hibernate cache, you want the latest data have trouble even session.clear (Database)
- A list of the basics of Python, Ganso, Dictionary (Programming)
- Remove old kernel on Ubuntu (Linux)
- Android custom controls create the simplest skid menu in the history (Programming)
- CentOS7 virtual machine creation failed Solution (Linux)
- To setup Cocos2dx project under Ubuntu (Linux)
- zBackup: A versatile tool to remove duplicate backup (Linux)
- To install the Git and Github under Ubuntu (Linux)
- MyCAT log analysis (Database)
- Oracle procedure or function Empty Table (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.