Commit Graph

315 Commits

Author SHA1 Message Date
Cole Helbling
9af0251bd6 Rework database fallback for v0.3 (#47)
Support migration from old database
2020-03-30 03:32:21 +05:30
Ajeet D'Souza
d4c8297f9b Use UUID4 for temporary database file name 2020-03-30 03:32:21 +05:30
Ajeet D'Souza
057ed96c0a Refactor DB architecture 2020-03-30 03:32:21 +05:30
Cole Helbling
91cced7333 Document _ZO_EXCLUDE_DIRS env var 2020-03-30 03:32:21 +05:30
Cole Helbling
1190106849 Implement _ZO_EXCLUDE_DIRS
_ZO_EXCLUDE_DIRS is a list of paths (separated by colons, `:`, on
Unix-based systems, and semicolons, `;`, on Windows) that should be
excluded from the database. Example:

    _ZO_EXCLUDE_DIRS="$HOME:$HOME/something/super/secret:$HOME/caused/by/background/cds"
2020-03-30 03:32:21 +05:30
Ajeet D'Souza
f29b642ffc Remove FIXME 2020-03-30 03:32:21 +05:30
Ajeet D'Souza
d4fb1a05cf Manually parse environment variables 2020-03-30 03:32:21 +05:30
Ajeet D'Souza
5547fb4b80 Rename migrate command to import 2020-03-30 03:31:22 +05:30
Ajeet D'Souza
76dfaad9a1 Set max DB size to 8 MiB 2020-03-30 03:30:12 +05:30
Ajeet D'Souza
890185176e Store paths as PathBuf rather than String 2020-03-30 03:30:12 +05:30
Ajeet D'Souza
857e15c65f Remove conversion to i64 when sorting 2020-03-30 03:30:12 +05:30
Ajeet D'Souza
5d709bded5 Remove i32 conversion from fzf helper 2020-03-30 03:30:12 +05:30
Cole Helbling
dc5f965b0c
Add POSIX shell support (#43)
Add POSIX shell support

Any users of a shell that adheres to the POSIX standard should now be
supported. Shells that were tested while this feature was in development
include `mrsh`, `dash`, busybox `ash`, and `bash --posix`.

The hook works by defining a `_zoxide_hook` function and adding it to
the shell's `PS1` (causing it to be evaluated every time the prompt is
redrawn).

The PWD hook has been removed, because it is impossible to implement in
a POSIX-compliant and satisfactory way.
2020-03-30 03:24:37 +05:30
Ajeet D'Souza
a14060335a Prepare for upgrade to v0.2.2 2020-03-20 01:18:52 +05:30
Douglas Campos
e5a051f679
add armv7 release step (#38) 2020-03-18 12:22:57 +05:30
Ajeet D'Souza
69546f8b11 Update README 2020-03-17 21:51:42 +05:30
Ajeet D'Souza
b3470de799 Remove flock 2020-03-17 13:05:10 +05:30
Ajeet D'Souza
03e8cd47a2 Fix exit codes in z and fzf 2020-03-17 12:34:53 +05:30
Ajeet D'Souza
146e5709fb Fix exit codes in 'z' command 2020-03-16 14:26:59 +05:30
Ajeet D'Souza
a5369beaa4 Prepare for release v0.2.1 2020-03-16 00:08:28 +05:30
Cole Helbling
083a834310
Allow merging when migrating from z (#33)
If the user passes the `--merge` flag to the `migrate` subcommand, all
duplicate entries will have their ranks and epochs updated: the rank
will be the sum of the stored rank and the newly-parsed rank, while the
epoch will be the maximum of the stored epoch and the newly-parsed
epoch.

This allows one to import from the `z` database even after having used
`zoxide` for any amount of time. This also permits a user who has
already sourced the init script to import their old database without
needing to do something like `rm ~/.zo && zoxide migrate ~/.z`.
2020-03-15 23:48:59 +05:30
Ajeet D'Souza
f4cd1159c5 Add $_ZO_ECHO to echo match before navigating 2020-03-15 17:55:54 +05:30
Ajeet D'Souza
f31fcf2d1f Add ranger plugin 2020-03-14 12:05:38 +05:30
Ajeet D'Souza
eb21727868 Use envy to parse environment variables 2020-03-13 14:12:20 +05:30
Ajeet D'Souza
41aabccb8f Add PWD hook for bash + fish 2020-03-13 07:09:21 +05:30
Ajeet D'Souza
9c8e8da71a Refactor + support PWD hook for zsh 2020-03-13 06:19:37 +05:30
Cole Helbling
4596716cc8
Migrate from z database (#29)
Migrate from `z` database

The new `migrate` subcommand takes in a path to the old `z` database and
naively parses it to add to the database. The command will fail if the user already has a database, so as to prevent tainting it in any way.
2020-03-13 05:15:06 +05:30
Ajeet D'Souza
65b37082b6 Add DB save to Drop trait 2020-03-12 23:07:50 +05:30
Ajeet D'Souza
e847847713 Fix spacing in z output 2020-03-12 01:04:52 +05:30
Ajeet D'Souza
a899ea3a29 Fix broken hyperlinks in README 2020-03-11 16:06:51 +05:30
Ajeet D'Souza
2c61cb1786 Update README 2020-03-11 05:14:44 +05:30
Ajeet D'Souza
128413e45f
Merge pull request #24 from ajeetdsouza/v0.2.0
Release v0.2.0
2020-03-11 04:48:47 +05:30
Ajeet D'Souza
aafc673673 Update README 2020-03-11 04:44:26 +05:30
Ajeet D'Souza
ba5efffd24 Merge branch 'master' into v0.2.0 2020-03-11 04:42:28 +05:30
Klaus Alexander Seistrup
01f21400e4
Add z - support to fish 2020-03-11 04:21:08 +05:30
Ajeet D'Souza
15b30206df Add 'z -' capability to bash and zsh 2020-03-11 01:58:40 +05:30
Ajeet D'Souza
34ab8f3f8b Add --no-define-aliases flag to zoxide init 2020-03-11 01:23:49 +05:30
Ajeet D'Souza
f0c5e28fd7 * Add init subcommand for bash, fish, and zsh
* Migrate errors from failure to anyhow
* Migrate argument parsing from clap to structopt
* Empty z command now goes to $HOME
* DB updates are now atomic and isolated
2020-03-11 00:14:50 +05:30
Ajeet D'Souza
6d91b4e3c4 Fix instructions in README 2020-03-10 03:06:54 +05:30
Serg Nesterov
14befa8bad
Track Cargo.lock (#19) 2020-03-10 01:19:45 +05:30
Erich Gubler
f9f1db8f30
fix(zsh): append _zoxide_precmd as a single-element array to hook (#10)
We should append `_zoxide_precmd` to `precmd_functions` within an array literal, not by itself.
2020-03-09 09:30:25 +05:30
Ajeet D'Souza
5a6f077ab6 Update README 2020-03-09 01:10:09 +05:30
Ajeet D'Souza
062f33ab61 Update README 2020-03-09 00:35:37 +05:30
Ajeet D'Souza
0aaf806260
Merge pull request #5 from alin23/master
Add table of contents
2020-03-09 00:17:29 +05:30
Alin Panaitiu
b31c26db6e
Add missing examples heading 2020-03-08 20:45:18 +02:00
Alin Panaitiu
f36ae49bae
Add all headings 2020-03-08 20:41:10 +02:00
Alin Panaitiu
9f7900ca69
Add table of contents 2020-03-08 20:27:24 +02:00
Ajeet D'Souza
842c03bd84
Merge pull request #4 from alin23/master
Add fish integration
2020-03-08 23:54:45 +05:30
Alin Panaitiu
f6822c06ad
Small fixes 2020-03-08 20:23:00 +02:00
Alin Panaitiu
e6879744c5
Remove key bindings 2020-03-08 18:19:56 +02:00