mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
Merge 79b3482cc7 into 615e41b0ec
This commit is contained in:
commit
5415a1ffb7
5 changed files with 53 additions and 11 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,9 +1,6 @@
|
|||
locals.zsh
|
||||
log/.zsh_history
|
||||
projects.zsh
|
||||
custom/*
|
||||
!custom/example
|
||||
!custom/example.zsh
|
||||
*.swp
|
||||
!custom/example.zshcache
|
||||
cache/
|
||||
|
|
|
|||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "vendor/beech"]
|
||||
path = vendor/beech
|
||||
url = git@github.com:pjaspers/beech.git
|
||||
11
custom/emacs.zsh
Normal file
11
custom/emacs.zsh
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/zsh
|
||||
|
||||
# Emacs
|
||||
function em() {
|
||||
emacs $@ &>/dev/null &!
|
||||
}
|
||||
|
||||
# Emacs client
|
||||
function emc() {
|
||||
emacsclient -n $@
|
||||
}
|
||||
30
custom/go.zsh
Normal file
30
custom/go.zsh
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/zsh
|
||||
|
||||
function project() {
|
||||
cmd="cd"
|
||||
file=$1
|
||||
|
||||
if [[ "open" == "$file" ]] then
|
||||
file=$2
|
||||
cmd=(${(s: :)EDITOR})
|
||||
fi
|
||||
|
||||
for project in $PROJECT_PATHS; do
|
||||
if [[ -d $project/$file ]] then
|
||||
$cmd "$project/$file"
|
||||
unset project # Unset project var
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
echo "No such project $1"
|
||||
}
|
||||
|
||||
alias p="project"
|
||||
alias m="project open"
|
||||
|
||||
function _project () {
|
||||
compadd `/bin/ls -l $PROJECT_PATHS 2>/dev/null | awk '{ print $9 }'`
|
||||
}
|
||||
|
||||
compdef _project project
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
setopt auto_name_dirs
|
||||
setopt auto_pushd
|
||||
setopt pushd_ignore_dups
|
||||
setopt pushdminus
|
||||
|
||||
alias ..='cd ..'
|
||||
alias cd..='cd ..'
|
||||
|
|
@ -11,14 +12,14 @@ alias cd.....='cd ../../../..'
|
|||
alias cd/='cd /'
|
||||
|
||||
alias 1='cd -'
|
||||
alias 2='cd +2'
|
||||
alias 3='cd +3'
|
||||
alias 4='cd +4'
|
||||
alias 5='cd +5'
|
||||
alias 6='cd +6'
|
||||
alias 7='cd +7'
|
||||
alias 8='cd +8'
|
||||
alias 9='cd +9'
|
||||
alias 2='cd -2'
|
||||
alias 3='cd -3'
|
||||
alias 4='cd -4'
|
||||
alias 5='cd -5'
|
||||
alias 6='cd -6'
|
||||
alias 7='cd -7'
|
||||
alias 8='cd -8'
|
||||
alias 9='cd -9'
|
||||
|
||||
cd () {
|
||||
if [[ "x$*" == "x..." ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue