mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Merge branch 'master' of github.com:jamesm-sitegen/oh-my-zsh
This commit is contained in:
commit
017e6f7803
4 changed files with 20 additions and 21 deletions
|
|
@ -45,7 +45,7 @@ for plugin ($plugins); do
|
|||
done
|
||||
|
||||
local ZSH_THEME
|
||||
zstyle -a :omz theme ZSH_THEME
|
||||
zstyle -a :omz:style theme ZSH_THEME
|
||||
|
||||
# Load the theme
|
||||
if [ "$ZSH_THEME" = "random" ]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
local ssh_env=$HOME/.ssh/environment-$HOST
|
||||
|
||||
function start_agent()
|
||||
function keychain_start_agent()
|
||||
{
|
||||
local -a identities
|
||||
|
||||
|
|
@ -15,23 +13,23 @@ function start_agent()
|
|||
}
|
||||
|
||||
function keychain() {
|
||||
local ssh_env=$HOME/.ssh/environment-$HOST
|
||||
|
||||
case $1 in
|
||||
"start") ;;
|
||||
"start")
|
||||
if [[ -f $ssh_env ]]; then
|
||||
source $ssh_env >/dev/null
|
||||
ps -p $SSH_AGENT_PID >/dev/null || keychain_start_agent
|
||||
else
|
||||
keychain_start_agent;
|
||||
fi
|
||||
;;
|
||||
"kill")
|
||||
ssh-agent -k
|
||||
echo "Stopping agent"
|
||||
ssh-agent -k >/dev/null && [[ -f $ssh_env ]] && rm $ssh_env
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
zstyle -a :omz:plugins:keychain autostart state
|
||||
if [[ $state == "on" ]]; then
|
||||
if [[ -f $ssh_env ]]; then
|
||||
source $ssh_env >/dev/null
|
||||
ps -p $SSH_AGENT_PID >/dev/null || start_agent
|
||||
else
|
||||
start_agent;
|
||||
fi
|
||||
fi
|
||||
|
||||
unfunction start_agent
|
||||
unset ssh_env
|
||||
[[ $state == "on" ]] && keychain start
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Check /etc/zsh/zshrc for system defaults.
|
||||
|
||||
ZSH_THEME="arch-blue"
|
||||
zstyle :omz:style theme "arch-blue"
|
||||
|
||||
plugins=(archlinux sprunge git github)
|
||||
|
||||
load_oh_my_zshell
|
||||
omz_init
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
ZSH=/usr/share/oh-my-zsh
|
||||
|
||||
zstyle -a :omz theme "arch-blue"
|
||||
zstyle :omz:style theme "arch-blue"
|
||||
|
||||
plugins=(archlinux sprunge)
|
||||
|
||||
omz_init(){
|
||||
omz_init() {
|
||||
source $ZSH/oh-my-zsh.zsh
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue