2013-05-05 11:06:05 +02:00
|
|
|
|
{ fetchurl, stdenv, python, bash }:
|
2009-05-27 00:05:05 +02:00
|
|
|
|
|
2013-05-05 11:06:05 +02:00
|
|
|
|
let
|
2013-09-26 01:17:31 +02:00
|
|
|
|
version = "21.6.9";
|
2013-05-05 11:06:05 +02:00
|
|
|
|
in
|
2009-05-27 00:05:05 +02:00
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
name = "autojump-${version}";
|
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2013-05-05 11:06:05 +02:00
|
|
|
|
url = "http://github.com/joelthelion/autojump/archive/release-v${version}.tar.gz";
|
2009-05-27 00:05:05 +02:00
|
|
|
|
name = "autojump-${version}.tar.gz";
|
2013-09-26 01:17:31 +02:00
|
|
|
|
sha256 = "0js6jp9l83zxhd9bn8hjn4yf8gydnldrlmafgvlg3rd4i1v82649";
|
2009-05-27 00:05:05 +02:00
|
|
|
|
};
|
|
|
|
|
|
2013-05-05 16:24:16 +02:00
|
|
|
|
buildInputs = [ python bash ];
|
2013-05-05 11:06:05 +02:00
|
|
|
|
dontBuild = true;
|
2009-05-27 00:05:05 +02:00
|
|
|
|
|
|
|
|
|
installPhase = ''
|
2013-07-07 11:21:45 +02:00
|
|
|
|
# don't check shell support (we're running with bash anyway)
|
|
|
|
|
sed -i -e 150,153d install.sh
|
|
|
|
|
|
2013-09-26 20:23:19 +02:00
|
|
|
|
bash ./install.sh -d $out -p ""
|
2013-09-26 01:17:31 +02:00
|
|
|
|
chmod +x $out/etc/profile.d/*
|
2009-05-27 00:05:05 +02:00
|
|
|
|
|
2012-01-18 21:16:00 +01:00
|
|
|
|
mkdir -p "$out/etc/bash_completion.d"
|
2013-05-05 11:06:05 +02:00
|
|
|
|
cp -v $out/etc/profile.d/autojump.bash "$out/etc/bash_completion.d"
|
2009-05-27 00:05:05 +02:00
|
|
|
|
|
|
|
|
|
# FIXME: What's the right place for `autojump.zsh'?
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
|
description = "Autojump, a `cd' command that learns";
|
|
|
|
|
longDescription = ''
|
|
|
|
|
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 jstat command shows you the
|
|
|
|
|
current contents of the database. You need to work a little
|
|
|
|
|
bit before the database becomes useable. Once your database
|
|
|
|
|
is reasonably complete, you can “jump” to a directory by
|
|
|
|
|
typing "j dirspec", 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.
|
|
|
|
|
|
|
|
|
|
Autojump supports tab-completion.
|
|
|
|
|
'';
|
|
|
|
|
homepage = http://wiki.github.com/joelthelion/autojump;
|
2013-05-05 12:46:23 +02:00
|
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2013-05-05 11:06:05 +02:00
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
|
maintainers = [ stdenv.lib.maintainers.iElectric ];
|
2009-05-27 00:05:05 +02:00
|
|
|
|
};
|
|
|
|
|
}
|