Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Bash environment is automatically install and initialize oh-my-zsh & autojump zsh     - Du and df show disk space usage inconsistent Causes and Treatment (Linux)

- Java abstract class instantiation (Programming)

- HTML5 postMessage cross-domain data exchange (Programming)

- Zend Studio PHP syntax color scheme to export (Linux)

- C ++ why we chose to use the smart pointer (Programming)

- Analysis of Java reflection mechanism (Programming)

- CentOS 6.7 compile and install LAMP (Server)

- To explore the Android ListView caching mechanism again (Programming)

- How to add and delete bookmarks in Ubuntu (Linux)

- Installation of Python2.7.10 under CentOS 6.4 (Linux)

- Installation on the way to the root source Ubuntu Server 14.04 LTS version Odoo8.0 (Server)

- Use Epoll develop high-performance application server on Linux (Server)

- Yii2 Advanced Version Copy New Project Problem Solved (Programming)

- Getting Started with Linux system to learn: how to check in a package is installed on Ubuntu (Linux)

- Ubuntu 14.04 virtual machine switching desktop environments (Linux)

- Installation Flow N Play- interface stylized video player on Ubuntu (Linux)

- Ubuntu prompt / lack of boot space solutions (Linux)

- Use libcurl library download url image (Programming)

- Nginx request processing (Server)

- Install DB2 V10 and Data Studio V3 under Linux (Ubuntu) environment (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:      
 
- Netapp storage routine inspections and information gathering (Linux)
- Reason C ++ program running under Linux a segmentation fault core dumped in (Programming)
- Automatic Clear date directory shell script (Linux)
- How to deploy Icinga client (Server)
- How to use the Docker Machine cluster deployment Swarm (Server)
- Ubuntu 15.10 installation and deployment Swift development environment (Linux)
- Linux command find (Linux)
- Prevent security threats caused Rootkit (Linux)
- MySQL bulk insert data script (Database)
- ORA-4031 error Solution (Database)
- Linux AS4 VPN server in conjunction with a firewall perfect (Linux)
- Let 32 Linux / CentOS system to support more than 4G memory (Linux)
- Macro Analysis Performance: PHP Performance Analysis and Experiment (Programming)
- MySQL Tutorial: Philosophical Reflections on the unauthenticated user (Database)
- MySQL main and backup replication structures (using mysqld_multi) (Database)
- Install the system cleaning software under Linux: BleachBit 1.4 (Linux)
- Use mdadm tool to create software RAID 0 (Linux)
- Ganglia Python plug-in the process of writing notes (Linux)
- To share Internet access through NAT mode under Virtual Linux VMware Workstation (Linux)
- HBase cluster installation and deployment (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.