Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into os_x

* master:
  Updated ec2-api-tools
  Squashed '.zsh.d/external/autojump/' changes from a74ef31..a17d904
  • Loading branch information...
commit 5863c910b04a3a68c95186db2550f91342a2e97d 2 parents ea5ab96 + 605ed1c
@sudish authored
View
36 .zsh.d/external/autojump/ChangeLog
@@ -0,0 +1,36 @@
+
+# Summary of significant changes, see commit history for more details:
+# https://github.com/joelthelion/autojump/commits/master/
+
+2011-03-15 Joël Schaerer <joel.schaerer@gmail.com>
+
+ * autojump.bash:
+ vim and emacs tab completion using autojump's database now supported in bash.
+
+2011-03-15 William Ting <william.h.ting@gmail.com>
+
+ * install.sh:
+ Default installation behavior now changes dependent on $UID and
+ $SHELL. Root install will copy files into /usr/. Non-root installations
+ will install into current user's home directory. This behavior can be
+ overridden arguments with --global or --local.
+
+ Installation also now checks $SHELL to install the correct version. This
+ behavior can be overridden with --bash or --zsh.
+
+2011-12-11 Joël Schaerer <joel.schaerer@gmail.com>
+
+ * Release v19:
+ - prototype `cp` and `mv` directory tab completion
+ - Debian post-installation instructions
+ - minor Mac OS X fixes
+
+2011-11-18 Joël Schaerer <joel.schaerer@gmail.com>
+
+ * Release v18:
+ - add automated version numbering
+ - performance tweaks to reduce filesystem checks
+ - add local installation option
+ - unicode fixes
+ - ugly fixes for Python 3
+ - migrate to new database format
View
121 .zsh.d/external/autojump/README.rst
@@ -8,70 +8,60 @@ A ``cd`` command that learns
One of the most used shell commands is ``cd``. A quick survey among my friends revealed that between 10 and 20% of all commands they type are actually ``cd`` commands! Unfortunately, jumping from one part of your system to another with ``cd`` requires to enter almost the full path, which isn't very practical and requires a lot of keystrokes.
-autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line. The jumpstat command shows you the current contents of the database. You need to work a little bit before the database becomes usable. Once your database is reasonably complete, you can "jump" to a commonly "cd"ed directory by typing:
+autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line. The jumpstat command shows you the current contents of the database. You need to work a little bit before the database becomes usable. Once your database is reasonably complete, you can "jump" to a commonly used directory by typing:
- j dirspec
+ j <dir>
-where dirspec is a few characters of the directory you want to jump to. It will jump to the most used directory whose
-name matches the pattern given in dirspec. Note that autojump isn't meant to be a drop-in replacement for cd, but rather a complement. Cd is fine when staying in the same area of the filesystem; autojump is there to help when you need to jump far away from your current location.
+where <dir> is a few characters of the directory you want to jump to. It will jump to the most used directory whose name matches the pattern given in dirspec. Note that autojump isn't meant to be a drop-in replacement for cd, but rather a complement. Cd is fine when staying in the same area of the filesystem; autojump is there to help when you need to jump far away from your current location.
-Autojump supports tab completion. Try it! Autojump should be compatible with bash 4. Please report any problems!
+Autojump supports tab completion starting with bash v4.0+.
Pierre Gueth contributed a very nice applet for freedesktop desktops (Gnome/KDE/...). It is called "jumpapplet", try it!
Thanks to Simon Marache-Francisco's outstanding work, autojump now works perfectly with zsh.
-Examples
-========
+Usage Examples
+==============
::
- j mp3
+ j music
-could jump to ``/home/gwb/my mp3 collection``, if that is the directory in which you keep your mp3s. ::
+would jump to ``/home/user/music/``, if that's a commonly directory traversed by command line. ::
- autojump mp3
+ autojump music
-prints out something like ``/home/gwb/my\ mp3\ collection'', but does not jump to that directory. ::
+displays the directory autojump would jump to if invoked. ::
jumpstat
-will print out something along the lines of::
+displays a listing of tracked directories and their respective weights. For example: ::
...
- 54.5: /home/shared/musique
- 60.0: /home/joel/workspace/coolstuff/glandu
- 83.0: /home/joel/workspace/abs_user/autojump
- 96.9: /home/joel/workspace/autojump
- 141.8: /home/joel/workspace/vv
- 161.7: /home/joel
+ 54.5: /home/shared/misc
+ 60.0: /home/user/Dropbox
+ 96.9: /home/user/code/autojump
+ 161.7: /home/user
Total key weight: 1077
The "key weight" reflects the amount of time you spend in a directory.
-Author
-======
+Authors
+=======
-Joel Schaerer (joel.schaerer (at) laposte.net)
-Autojump applet written by Pierre Gueth
-Zsh support: Simon Marache-Francisco
-Install script written by Daniel Jackoway and others.
+- Joel Schaerer (joel.schaerer (at) laposte.net)
+- autojump applet: Pierre Gueth
+- zsh support: Simon Marache-Francisco, William Ting
+- installation: Daniel Jackoway, William Ting, and others.
License
=======
-autojump is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+autojump is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-autojump is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+autojump is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with autojump. If not, see <http://www.gnu.org/licenses/>.
+You should have received a copy of the GNU General Public License along with autojump. If not, see <http://www.gnu.org/licenses/>.
Requirements
============
@@ -81,50 +71,65 @@ Python v2.6+ or 3.0+
Installation
============
-Auto Installation
------------------
+Automatic Installation
+----------------------
-run::
+**Linux**
- ./install.sh [ --local ] [ --zsh ]
+autojump is included in the following distro repositories, please use relevant package management utilities to install (e.g. yum, apt-get, etc):
-and follow on screen instructions.
+- Debian testing/unstable, Ubuntu, Linux Mint
-Use --local to install into current user's home directory.
+ On Debian only, autojump requires manual activation for policy reasons. Please see ``/usr/share/doc/autojump/README.Debian``.
-Use --zsh to install for Z shell.
+- RedHat, Fedora, CentOS
+- ArchLinux
+- Gentoo
+- Frugalware
+- Slackware
-Troubleshoot
-------------
+**Mac**
-If the script fails, you may need to do::
+Homebrew is the recommended installation method for Mac OS X::
- chmod +x install.sh
+ brew install autojump
-before the first step.
+A MacPorts installation method is also `available <https://trac.macports.org/browser/trunk/dports/sysutils/autojump/Portfile>`_.
-Packaging
-=========
+**Other**
-For now gcarrier and I have packaged autojump for Arch Linux. It is available in [community]. To install, type::
+Please check the wiki for an up to date listing of installation methods.
- pacman -S autojump
+Manual Installation
+-------------------
-Autojump is now officially a part of Debian Sid, thanks to Tanguy Ortolo’s work (for policy reasons, it requires manual activation after installing, see /usr/share/doc/autojump/README.Debian). To install, type::
+Grab a copy of autojump::
- apt-get install autojump
+ git clone git://github.com/joelthelion/autojump.git
-Autojump is also available on the OSX Homebrew package manager::
+Run the installation script::
- brew install autojump
+ cd autojump
+ ./install.sh [ --local ] [ --zsh ]
-Autojump is also packaged for a number of other distros. Check the wiki for an up-to-date list! I would be very interested by packages for other distros. If you think you can help with the packaging, please contact me!
+and follow on screen instructions.
-Uninstallation
-==============
+Use --local to install into current user's home directory.
+
+Use --zsh to install for Z shell.
+
+Manual Uninstallation
+---------------------
+
+It is recommended to use your distribution's relevant package management utilities, unless you installed manually or ran into uninstallation issues.
+
+Grab a copy of autojump::
+
+ git clone git://github.com/joelthelion/autojump.git
-run::
+Run the uninstallation script::
+ cd autojump
./uninstall.sh
and follow on screen instructions.
View
6 .zsh.d/external/autojump/autojump.bash
@@ -44,11 +44,11 @@ _autojump_files()
EOF
fi
}
-complete -o default -o bashdefault -F _autojump_files cp mv meld diff kdiff3
+complete -o default -o bashdefault -F _autojump_files cp mv meld diff kdiff3 vim emacs
#determine the data directory according to the XDG Base Directory Specification
-if [ -n "$XDG_DATA_HOME" ]; then
- export AUTOJUMP_DATA_DIR="$XDG_DATA_HOME/autojump"
+if [[ -n ${XDG_DATA_HOME} ]] && [[ ${XDG_DATA_HOME} =~ ${USER} ]]; then
+ export AUTOJUMP_DATA_DIR="${XDG_DATA_HOME}/autojump"
else
export AUTOJUMP_DATA_DIR=~/.local/share/autojump
fi
View
29 .zsh.d/external/autojump/autojump.zsh
@@ -15,28 +15,31 @@
#along with autojump. If not, see <http://www.gnu.org/licenses/>.
# determine the data directory according to the XDG Base Directory Specification
-if [ -n "$XDG_DATA_HOME" ]; then
- export AUTOJUMP_DATA_DIR="$XDG_DATA_HOME/autojump"
+if [[ -n ${XDG_DATA_HOME} ]] && [[ ${XDG_DATA_HOME} =~ ${USER} ]]; then
+ export AUTOJUMP_DATA_DIR="${XDG_DATA_HOME}/autojump"
else
- export AUTOJUMP_DATA_DIR=~/.local/share/autojump
+ export AUTOJUMP_DATA_DIR=${HOME}/.local/share/autojump
fi
-if [ ! -e "${AUTOJUMP_DATA_DIR}" ]; then
+if [[ ! -e ${AUTOJUMP_DATA_DIR} ]]; then
mkdir -p "${AUTOJUMP_DATA_DIR}"
- mv ~/.autojump_py "${AUTOJUMP_DATA_DIR}/autojump_py" 2>>/dev/null #migration
- mv ~/.autojump_py.bak "${AUTOJUMP_DATA_DIR}/autojump_py.bak" 2>>/dev/null
- mv ~/.autojump_errors "${AUTOJUMP_DATA_DIR}/autojump_errors" 2>>/dev/null
+ mv ${HOME}/.autojump_py "${AUTOJUMP_DATA_DIR}/autojump_py" 2>>/dev/null #migration
+ mv ${HOME}/.autojump_py.bak "${AUTOJUMP_DATA_DIR}/autojump_py.bak" 2>>/dev/null
+ mv ${HOME}/.autojump_errors "${AUTOJUMP_DATA_DIR}/autojump_errors" 2>>/dev/null
fi
# set paths if necessary for local installations
-if [[ -d ~/.autojump/ ]]; then
- path=(~/.autojump/bin $path)
- fpath=(~/.autojump/functions/ $fpath)
+if [[ -d ${HOME}/.autojump ]]; then
+ path=(${HOME}/.autojump/bin ${path})
+ fpath=(${HOME}/.autojump/functions/ ${fpath})
+fi
+# set fpath if necessary for homebrew installation
+if [[ -d "`brew --prefix 2>/dev/null`/share/zsh/functions" ]]; then
+ fpath=(`brew --prefix`/share/zsh/functions ${fpath})
fi
function autojump_preexec() {
- if [[ "${AUTOJUMP_KEEP_SYMLINKS}" == "1" ]]
- then
+ if [[ "${AUTOJUMP_KEEP_SYMLINKS}" == "1" ]]; then
_PWD_ARGS=""
else
_PWD_ARGS="-P"
@@ -49,4 +52,4 @@ preexec_functions+=autojump_preexec
alias jumpstat="autojump --stat"
-function j { local new_path="$(autojump $@)";if [ -n "$new_path" ]; then echo -e "\\033[31m${new_path}\\033[0m"; cd "$new_path";else false; fi }
+function j { local new_path="$(autojump $@)";if [ -n "${new_path}" ]; then echo -e "\\033[31m${new_path}\\033[0m"; cd "${new_path}";else false; fi }
View
59 .zsh.d/external/autojump/install.sh
@@ -21,9 +21,9 @@ function add_msg {
echo
if [ "${1}" == "global" ]; then
- echo -e "\tsource /etc/profile.d/autojump.${2}"
+ echo -e "\t[[ -f /etc/profile.d/autojump.${2} ]] && source /etc/profile.d/autojump.${2}"
elif [ "${1}" == "local" ]; then
- echo -e "\tsource ~/.autojump/etc/profile.d/autojump.${2}"
+ echo -e "\t[[ -f ~/.autojump/etc/profile.d/autojump.${2} ]] && source ~/.autojump/etc/profile.d/autojump.${2}"
fi
echo
@@ -34,13 +34,26 @@ function add_msg {
}
function help_msg {
- echo "sudo ./install.sh [--local] [--prefix /usr/local] [--zsh]"
+ echo
+ echo "./install.sh [--global or --local] [--bash or --zsh] [--prefix /usr/] "
+ echo
+ echo "If run without any arguments, the installer will:"
+ echo
+ echo -e "\t- as root install globally into /usr/"
+ echo -e "\t- as non-root install locally to ~/.autojump/"
+ echo -e "\t- version will be based on \$SHELL environmental variable"
+ echo
}
# Default install directory.
-prefix=/usr
-shell="bash"
-local=
+shell=`echo ${SHELL} | awk -F/ '{ print $NF }'`
+if [[ ${UID} -eq 0 ]]; then
+ local=
+ prefix=/usr
+else
+ local=true
+ prefix=~/.autojump
+fi
user=${SUDO_USER:-${USER}}
OS=`uname`
@@ -55,6 +68,14 @@ bashrc_file=${user_home}/.bashrc
# Command line parsing
while true; do
case "$1" in
+ -b|--bash)
+ shell="bash"
+ shift
+ ;;
+ -g|--global)
+ local=
+ shift
+ ;;
-h|--help|-\?)
help_msg;
exit 0
@@ -68,7 +89,7 @@ while true; do
if [ $# -gt 1 ]; then
prefix=$2; shift 2
else
- echo "--prefix or -p require an argument" 1>&2
+ echo "--prefix or -p requires an argument" 1>&2
exit 1
fi
;;
@@ -91,6 +112,20 @@ while true; do
esac
done
+# check for valid local install options
+if [[ ${UID} != 0 ]] && [ ! ${local} ]; then
+ echo
+ echo "Please rerun as root or use the --local option."
+ echo
+ exit 1
+fi
+
+# check shell if supported
+if [[ ${shell} != "bash" ]] && [[ ${shell} != "zsh" ]]; then
+ echo "Unsupported shell (${shell}). Use --bash or --zsh to explicitly define shell."
+ exit 1
+fi
+
# check Python version
python_version=`python -c 'import sys; print(sys.version_info[:])'`
if [[ ${python_version:1:1} -eq 2 && ${python_version:4:1} -lt 6 ]]; then
@@ -106,16 +141,8 @@ if [[ ${python_version:1:1} -eq 2 && ${python_version:4:1} -lt 6 ]]; then
exit 1
fi
-# check for valid options
-if [[ ${UID} != 0 ]] && [ ! ${local} ]; then
- echo
- echo "Please rerun as root or use the --local option."
- echo
- exit 1
-fi
-
echo
-echo "Installing files to ${prefix} ..."
+echo "Installing ${shell} version of autojump to ${prefix} ..."
echo
# add git revision to autojump
View
4 .zsh.d/external/autojump/uninstall.sh
@@ -24,9 +24,9 @@ function remove_msg {
echo "Please remove the line from .${2}rc :"
echo
if [ "${1}" == "global" ]; then
- echo -e "\tsource /etc/profile.d/autojump.${2}"
+ echo -e "\t[[ -f /etc/profile.d/autojump.${2} ]] && source /etc/profile.d/autojump.${2}"
elif [ "${1}" == "local" ]; then
- echo -e "\tsource ~/.autojump/etc/profile.d/autojump.${2}"
+ echo -e "\t[[ -f ~/.autojump/etc/profile.d/autojump.${2} ]] && source ~/.autojump/etc/profile.d/autojump.${2}"
fi
echo
}
View
2  .zsh.d/init.d/S95_AWS_config
@@ -11,7 +11,7 @@ export EC2_CERT=$creds_dir/aws-sudish-cert.pem
# defining the AWS_CREDENTIAL_FILE causes rds tools to blow up
#export AWS_CREDENTIAL_FILE=$creds_dir/aws-sudish-iam-credentials-master
-export EC2_HOME="/usr/local/Cellar/ec2-api-tools/1.5.2.3/jars"
+export EC2_HOME="/usr/local/Cellar/ec2-api-tools/1.5.2.4/jars"
export AWS_RDS_HOME="/usr/local/Cellar/rds-command-line-tools/1.3.003/jars"
export EC2_AMITOOL_HOME="/usr/local/Cellar/ec2-ami-tools/1.3-45758/jars"
export AWS_IAM_HOME="/usr/local/Cellar/aws-iam-tools/HEAD/jars"
Please sign in to comment.
Something went wrong with that request. Please try again.