Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Bash environment is automatically install and initialize oh-my-zsh & autojump zsh     - Use C program in JavaScript (Programming)

- MySQL5.7.10 installation documentation (Database)

- How to install Go1.5 source development environment on Mac (Server)

- Ubuntu 14.04 build Hadoop 2.5.1 standalone and pseudo-distributed environment (32-bit) (Server)

- Single-node Hadoop environment to build (Server)

- Linux basic articles of the boot process (Linux)

- Linux kernel RCU (Read Copy Update) lock Brief (Linux)

- mysqldump implement database logical backup (Database)

- Installation CD audio file extraction tool Flacon (Linux)

- Android media library of analysis: MediaProvider (Programming)

- Installation Atom text editor on Mint Ubuntu / Linux (Linux)

- How to compare PDF files on Ubuntu (Linux)

- Linux systems dmesg command processing failures and system information collected seven usage (Linux)

- Batch kill processes using awk command (Linux)

- Hadoop2.4.0 Eclipse plug-in making (Server)

- Notebook computer forget password solution (Linux)

- CentOS 6.6 install rsync server (Server)

- Linux, modify / retrieve the root password (Linux)

- Extended use of the swap file swap space on Linux (Linux)

- VMWare virtual machine without rebooting way to add virtual disk (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:      
 
- Win7 used Eclipse to connect the virtual machine in Ubuntu Hadoop2.4 (Server)
- Shell Programming Regular Expressions (Programming)
- Java thread pool: ExecutorService, Executors (Programming)
- Basic Java JNI (Programming)
- Oracle data row split multiple lines (Database)
- Linux Basics Tutorial: create your own Vim IDE (Linux)
- Debian 8 Jessie install LAMP server tutorial (Server)
- Ubuntu 14.04 Boot Repair (Linux)
- Linux compression and decompression command (Linux)
- Oracle 11g new features of the collection of multi-column statistics (Database)
- JavaScript, some conclusions about the implicit conversion (Programming)
- MongoDB 3.2 to upgrade from 3.0.7 (Database)
- CentOS 7.0 Close firewall is enabled by default iptables firewall (Linux)
- Linux kernel programming parameter passing between modules and function calls (Programming)
- Linux Nginx installation and configuration instructions (Server)
- Summary of Docker mounted directory (Server)
- Install and use automated tools Ansible in CentOS 7 (Linux)
- Linux Network Programming --IP packet format Detailed (Programming)
- Nginx version of helloworld (Server)
- The next key to install Linux bash script PowerShell (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.