~ubuntu-branches/ubuntu/saucy/autojump/saucy

« back to all changes in this revision

Viewing changes to autojump.zsh

  • Committer: Bazaar Package Importer
  • Author(s): Tanguy Ortolo
  • Date: 2010-08-10 10:22:17 UTC
  • Revision ID: james.westby@ubuntu.com-20100810102217-an0j349xl7sfiiv9
Tags: upstream-11
ImportĀ upstreamĀ versionĀ 11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#Copyright Joel Schaerer 2008, 2009
 
2
#This file is part of autojump
 
3
 
 
4
#autojump is free software: you can redistribute it and/or modify
 
5
#it under the terms of the GNU General Public License as published by
 
6
#the Free Software Foundation, either version 3 of the License, or
 
7
#(at your option) any later version.
 
8
#
 
9
#autojump is distributed in the hope that it will be useful,
 
10
#but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
#GNU General Public License for more details.
 
13
#
 
14
#You should have received a copy of the GNU General Public License
 
15
#along with autojump.  If not, see <http://www.gnu.org/licenses/>.
 
16
 
 
17
function autojump_preexec() {
 
18
    { (autojump -a "$(pwd -P)"&)>/dev/null 2>>|${HOME}/.autojump_errors ; } 2>/dev/null
 
19
}
 
20
 
 
21
typeset -ga preexec_functions
 
22
preexec_functions+=autojump_preexec
 
23
 
 
24
alias jumpstat="autojump --stat"
 
25
 
 
26
function j { local new_path="$(autojump $@)";if [ -n "$new_path" ]; then echo -e "\\033[31m${new_path}\\033[0m"; cd "$new_path";fi }