Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Bash environment is automatically install and initialize oh-my-zsh & autojump zsh     - Android Get App version number and version name (Programming)

- Installation and Configuration rsync server under CentOS 6.3 (Server)

- How to build Memcached Docker container (Server)

- The Linux kernel and AVL tree in red-black tree (Programming)

- SQL MySQL query table duplicate data (Database)

- Android Scroller call mechanism and the relationship of computeScroll (Programming)

- How to install web crawler tool in Ubuntu 14.04 LTS: Scrapy (Linux)

- How to configure MongoDB replica set (Database)

- RHEL6.4 x86_64 build SVN service (Server)

- The default permissions for files and directories under Linux computing (Linux)

- Nginx Performance Tuning Guidelines (Server)

- Manually generate AWR reports (Database)

- Use innobackupex full realization of MySQL hot backup (Database)

- Nginx is used to build the cache module srcache_nginx (Server)

- Oracle Database High-Risk Vulnerability Warning (Database)

- Java transient keyword (Programming)

- Oracle Linux 5.9 configuration Xmanager (Linux)

- Zabbix monitoring tool deployment under Ubuntu server (Server)

- Vagrant build LNMP environment (Server)

- Java proxy mode (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:      
 
- Deploy Mono 4 and Jexus 5.6 on CentOS7 (Server)
- C ++ implementation of the list of basic operations and test cases (Programming)
- Java programmers talk about those advanced knowledge and direction (Programming)
- Mac OS X Server installation and application (Linux)
- MySQL and MariaDB new master from the cluster configuration GTID (Database)
- Nginx + ownCloud + PHP + MySQL to build personal private cloud under CentOS7 (Server)
- Github Getting Started Basic Course (Linux)
- Three details reflect the Unix system security (Linux)
- Linux Security Raiders SSH tools SCP uses examples to explain in detail (Linux)
- Linux kernel RCU (Read Copy Update) lock Brief - prequel (Linux)
- Cobbler Add custom YUM source (Linux)
- JavaScript prototype and the prototype chain (Programming)
- Novice Advanced Ubuntu7.10 configured IP address (Linux)
- Workspace Go language and environment variables GOPATH (Linux)
- The difference between free command displays the buffers and cache (Linux)
- Android Studio interface-related settings (Linux)
- OpenSUSE 13.1 OpenSUSE 12.3 and how to install Cinnamon 2.2 Desktop (Linux)
- Valgrind * not * leak check tool (Linux)
- Getting Started with Linux: CentOS7 Install Mono with the yum command (Server)
- C # Future: Method Contract (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.