mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Merge branch 'master' into git-improved
This commit is contained in:
commit
ee13a42106
4 changed files with 7 additions and 7 deletions
|
|
@ -38,9 +38,9 @@ for plugin ($plugins); do
|
|||
done
|
||||
|
||||
# Figure out the SHORT hostname
|
||||
if [ -n "$commands[scutil]" ]; then
|
||||
# OS X
|
||||
SHORT_HOST=$(scutil --get ComputerName)
|
||||
if [[ "$OSTYPE" = darwin* ]]; then
|
||||
# OS X's $HOST changes with dhcp, etc. Use ComputerName if possible.
|
||||
SHORT_HOST=$(scutil --get ComputerName 2>/dev/null) || SHORT_HOST=${HOST/.*/}
|
||||
else
|
||||
SHORT_HOST=${HOST/.*/}
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -125,14 +125,12 @@ alias gsd='git svn dcommit'
|
|||
# Usage example: git pull origin $(current_branch)
|
||||
#
|
||||
function current_branch() {
|
||||
if [ ! -d .git ]; then return; fi
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || \
|
||||
ref=$(git rev-parse --short HEAD 2> /dev/null) || return
|
||||
echo ${ref#refs/heads/}
|
||||
}
|
||||
|
||||
function current_repository() {
|
||||
if [ ! -d .git ]; then return; fi
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || \
|
||||
ref=$(git rev-parse --short HEAD 2> /dev/null) || return
|
||||
echo $(git remote -v | cut -d':' -f 2)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Symfony2 basic command completion
|
||||
|
||||
_symfony_console () {
|
||||
echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console')"
|
||||
echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' -type f | head -n 1)"
|
||||
}
|
||||
|
||||
_symfony2_get_command_list () {
|
||||
|
|
@ -13,6 +13,8 @@ _symfony2 () {
|
|||
}
|
||||
|
||||
compdef _symfony2 '`_symfony_console`'
|
||||
compdef _symfony2 'app/console'
|
||||
compdef _symfony2 'bin/console'
|
||||
compdef _symfony2 sf
|
||||
|
||||
#Alias
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ prompt_setup_pygmalion(){
|
|||
base_prompt_nocolor=$(echo "$base_prompt" | perl -pe "s/%\{[^}]+\}//g")
|
||||
post_prompt_nocolor=$(echo "$post_prompt" | perl -pe "s/%\{[^}]+\}//g")
|
||||
|
||||
add-zsh-hook precmd prompt_pygmalion_precmd
|
||||
precmd_functions+=(prompt_pygmalion_precmd)
|
||||
}
|
||||
|
||||
prompt_pygmalion_precmd(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue