2023-07-12 15:22:45 +00:00
|
|
|
|
{ lib, stdenv, fetchFromGitHub, python3 }:
|
2009-05-26 22:05:05 +00:00
|
|
|
|
|
2018-05-18 14:11:12 +00:00
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
|
pname = "autojump";
|
2019-04-16 18:31:48 +00:00
|
|
|
|
version = "22.5.3";
|
2009-05-26 22:05:05 +00:00
|
|
|
|
|
2018-05-18 14:11:12 +00:00
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "wting";
|
|
|
|
|
repo = "autojump";
|
|
|
|
|
rev = "release-v${version}";
|
2019-04-16 18:31:48 +00:00
|
|
|
|
sha256 = "1rgpsh70manr2dydna9da4x7p8ahii7dgdgwir5fka340n1wrcws";
|
2018-05-18 14:11:12 +00:00
|
|
|
|
};
|
|
|
|
|
|
2022-11-22 15:19:35 +00:00
|
|
|
|
buildInputs = [ python3 ];
|
2022-01-10 05:44:37 +00:00
|
|
|
|
nativeBuildInputs = [ python3 ];
|
2018-05-18 14:11:12 +00:00
|
|
|
|
dontBuild = true;
|
2022-11-22 15:19:35 +00:00
|
|
|
|
strictDeps = true;
|
2018-05-18 14:11:12 +00:00
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
python ./install.py -d "$out" -p "" -z "$out/share/zsh/site-functions/"
|
|
|
|
|
|
|
|
|
|
chmod +x "$out/etc/profile.d/autojump.sh"
|
|
|
|
|
install -Dt "$out/share/bash-completion/completions/" -m444 "$out/share/autojump/autojump.bash"
|
|
|
|
|
install -Dt "$out/share/fish/vendor_conf.d/" -m444 "$out/share/autojump/autojump.fish"
|
|
|
|
|
install -Dt "$out/share/zsh/site-functions/" -m444 "$out/share/autojump/autojump.zsh"
|
|
|
|
|
'';
|
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
|
meta = with lib; {
|
2018-05-18 14:11:12 +00:00
|
|
|
|
description = "A `cd' command that learns";
|
2024-03-19 02:14:51 +00:00
|
|
|
|
mainProgram = "autojump";
|
2018-05-18 14:11:12 +00:00
|
|
|
|
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 usable. 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.
|
2009-05-26 22:05:05 +00:00
|
|
|
|
'';
|
2020-04-01 01:11:51 +00:00
|
|
|
|
homepage = "https://github.com/wting/autojump";
|
2018-05-18 14:11:12 +00:00
|
|
|
|
license = licenses.gpl3;
|
|
|
|
|
platforms = platforms.all;
|
|
|
|
|
maintainers = with maintainers; [ domenkozar yurrriq ];
|
|
|
|
|
};
|
|
|
|
|
}
|