Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Bash environment is automatically install and initialize oh-my-zsh & autojump zsh     - To record command input under Linux (Linux)

- Three methods easy data encryption on Linux (Linux)

- Go Languages Reviews (Programming)

- IntelliJ IDEA common list of shortcuts (Linux)

- Scope of variables in C # (Programming)

- Repair Chrome for Linux is (Linux)

- Objective-C basic program structure (Programming)

- Debian 8.1 (amd64) deployed Memcached (Server)

- Debian installation (Linux)

- How to create a remote (Linux)

- Linux CentOS configuration SVN + SVN hook (Server)

- Ubuntu 12.04 installation instructions under GAMIT10.40 (Linux)

- Incremental garbage collection mechanism for Ruby 2.2 (Programming)

- The difference between Linux su and sudo commands (Linux)

- Configuring xdebug debugging environment in Ubuntu 14.04 under the PhpStorm (Linux)

- 64-bit Ubuntu 15.10 How to compile the latest version of the 32 Wine 1.7.53 (Linux)

- MySQL can not write the data keyword conflicts (Database)

- How do you temporarily emptied Bash environment variable before running the command on Linux (Linux)

- Examples of safety testing system notes for RedHat Linux (Linux)

- Storm how to assign tasks and load balancing (Programming)

 
         
  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:      
 
- MySQL binlog group to submit XA (two-phase commit) (Database)
- Ubuntu 14.04 / 14.10 how to install Mate 1.10.0 (Linux)
- Linux System Tutorial: Ubuntu on the desktop is disabled by default keyring to unlock tips (Linux)
- C ++ based foundation: the difference between C and C ++ (Programming)
- First start with Kali Linux 2.0 (Linux)
- GROUP BY extension (Database)
- Installation JDK 1.8 under CentOS7 (Linux)
- The wrong in Linux: too many open files (Linux)
- [SHELL] MySQL primary recovery solution from + Keepalived online (Server)
- Android basics summary article (Programming)
- MySQL master recovery from failure using binlog (Database)
- Linux AS4 VPN server in conjunction with a firewall perfect (Linux)
- Using monitoring tool dsniff (Linux)
- Java string intern constant pool resolution Introduction (Programming)
- SQL MySQL query table duplicate data (Database)
- Linux Shell Understanding and Learning (Linux)
- Linux operating system security settings initial understanding (Linux)
- Ubuntu 12.04 installation OpenCV2.4.1 and compile test (Linux)
- GAMIT10.5 under CentOS installation (Linux)
- Simple Linux file system - df, du, ln (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.