rupa
b82dadc1a8
Be explicit that -c matches should start with cwd, not just contain it.
2013-03-03 09:47:02 -05:00
rupa
2ce7fca7af
Remove extra . from man page.
2013-03-03 02:54:55 -05:00
rupa
2c2ebc2b28
update README to match man page
2013-03-03 02:51:50 -05:00
rupa
76852ebb49
Allow options to be combined e.g -clt
2013-03-03 02:49:11 -05:00
rupa
f5e4ff6a26
test directly, instead of testing exit variable
2013-03-03 02:24:12 -05:00
rupa
ce3330e91f
Make -c without args work like regular z does
2013-03-03 01:59:26 -05:00
rupa
0f3f7a437f
-c option restricts matches to subdirs of cwd.
...
Closes #83
2013-03-03 00:54:40 -05:00
rupa
b554f71399
Use _Z_CMD in z -h
2013-03-03 00:51:32 -05:00
rupa
f186800c13
Add Makefile for README
2013-02-25 01:42:05 -05:00
rupa
ca5661cb39
Add warning message if z.sh is executed instead of sourced.
...
Closes #74
2013-02-22 15:20:08 -05:00
rupa
2bdd699beb
Merge pull request #78 from ntsuji/groff_man
...
More groff_man-ish coding style
2013-01-22 08:30:07 -08:00
rupa
51dd0ba37f
reflect aging formula changes in man page and README
2013-01-20 11:19:14 -05:00
rupa
cf49435c73
Merge pull request #76 from nmeum/master
...
You only need one '=' character to check if something is equal. closes #75 and #76 .
2013-01-20 08:11:06 -08:00
rupa
b6f32ee5cd
Change aging algorithm.
...
Aging happens when the sum of rankings passes a threshold. Raise this
threshold from 1000 to 6000.
Change aging multiplier from .9 to .99.
This formula is still pretty naive, and wants improvement, but seems to
be nicer. The previous constants tended to forget things too fast.
Closes #53 , for now.
2013-01-18 19:44:28 -05:00
rupa
41a9119d38
revert an accidentally commited bit
2013-01-12 00:48:30 -05:00
rupa
61c4b1f8c0
docs
...
README
also removes zsh backward incompatibility warning
2013-01-12 00:45:38 -05:00
rupa
8ed575354b
add exclude functionality
...
* Exclude dirs listed in the $_Z_EXCLUDE_DIRS array
2013-01-11 12:28:23 -05:00
rupa
dfd4308ae8
ZSH USERS NOTE BACKWARD COMPATIBILITY WARNING!
...
Fix -t flag selecting the least, rather than most, recent matching
entry. Closes #68 .
2012-09-06 11:50:57 -04:00
rupa
b2d48e0a68
ZSH USERS NOTE BACKWARD COMPATIBILITY WARNING!
...
Test for compctl first, as bash will never have compctl, but zsh may
have complete, if bashcompinit was called. Since we're using this test
for prompt/precmd as well as completion, we want to run the right logic.
2012-09-03 18:07:37 -04:00
rupa
9ac0898e1b
Merge pull request #62 from aeosynth/master
...
remove double cdargs mention
2012-09-01 13:43:36 -07:00
rupa
9bf5feb86a
ZSH USERS NOTE BACKWARD COMPATIBILITY WARNING!
...
use cool PWD functionality in zsh precmd (and avoid a subshell) at
the expense of a kind of clunky if/else. Thanks @sorin-ionescu.
2012-08-30 17:39:47 -04:00
rupa
3d896ea6c4
ZSH USERS NOTE BACKWARD COMPATIBILITY WARNING!
...
Better documentation of zsh changes in README
2012-08-30 11:32:34 -04:00
rupa
138cf7a9ed
ZSH USERS NOTE BACKWARD COMPATIBILITY WARNING!
...
* z now handles precmd functionality for zsh, and no longer requires
it to be set manually. However, this breaks backward compatibility
with zsh.
Existing users who use zsh should remove the precmd function they
added when installing.
* z now respects _Z_NO_RESOLVE_SYMLINKS and _Z_NO_PROMPT_COMMAND
variables under zsh.
* Documentation updated to reflect changes in installation instructions
2012-08-29 01:32:15 -04:00
rupa
175a6d9723
let shells do the quoting in completions, like they should
...
Dug around in bash docs until I found out how to get it to quote
metachars in tab completions like zsh does by default, so that's
nice. I knew you you could do it, bash!
2012-08-10 03:03:20 -04:00
rupa
66898d08c8
metacharacters in directory names
...
* quote metachars in tab completions because bash doesn't, or at least,
I can't figure out how to tell it to yet.
* tell zsh NOT to quote metachars in tab completions because it does, by
default. this is irritating, as i'm sure it's better than me at it.
* do the irritating metachar quoting that's been a PITA on a copy
of the variable, so we can return the original, because gsub modifies
in place.
TODO: if we're going to be taking over metacharacter quoting, we ought
to do it less halfhazardly
2012-08-10 02:29:55 -04:00
rupa
ae7f1d1660
another fix to the stupid regex escaping.
...
This one works in gawk as well as mawk, and let's hope it works in the
other bazillion flavors of awk as well. :/
2012-08-09 14:48:53 -04:00
rupa
10a7cfee01
correct a bug when escaping regex characters
...
* "\\&" was just turning characters into literal &s, "\\\&" seems to
work, at least on this OS/awk version.
* Added ) and ] to escaped characters.
2012-08-09 14:11:31 -04:00
rupa
144b89b4a4
Merge branch 'master' of github.com:rupa/z
2012-07-11 17:08:32 -04:00
rupa
31f9866520
Try to be clearer in installation docs
2012-07-11 17:07:54 -04:00
rupa
9162239fbd
fix for gawk with regex chars in paths
...
Sub out regex chars in paths before comparing them. Fixes gawk and
doesn't seem to break other awks. Closes #54
2012-07-04 00:27:26 -04:00
rupa
8272e6ff7f
respect _Z_NO_PROMPT_COMMAND environment variable
...
For those who wish to set their PROMPT_COMMAND manually. Closes #44 .
2012-07-03 17:54:36 -04:00
rupa
30cbc62c10
use and document _Z_NO_RESOLVE_SYMLINKS variable
2012-06-25 11:47:46 -04:00
rupa
55e1226f7d
useless use of cat
2012-06-22 20:24:43 -04:00
rupa
a33a411c8d
revert accidental change
...
Accidentally set z not to resolve symlinks. I'm leaning towards making
this the default, but I'm not ready to "commit" yet (haha)
2012-06-22 19:41:03 -04:00
rupa
5276d4d021
replace notdir hack
...
* Test entries in datafile via shell and pipe them into awk, rather than
doing the test in awk.
2012-06-22 10:22:22 -04:00
rupa
771c58409b
remove quotes from completions for now
...
closes #46
2012-04-14 16:11:44 -04:00
rupa
ac62d7c61c
prune removed dirs from datafile
...
* this got lost when I tried to minimize writes to the data file
2012-02-07 12:00:03 -05:00
rupa
7fe57a5829
deal with weird dirs a bit better
...
* quote tab expansions
* commented out code for thinking about dirs that break awk regex.
Haven't quite figured out a good approach.
2012-02-07 11:52:47 -05:00
rupa
4a0f3f8280
fix bash tab completion.
2012-02-07 10:34:42 -05:00
rupa
f8a7cb0672
performance improvement from clvv
...
see https://github.com/clvv/z/commit/4f313ac39eb34ff08a41e5efafbf0d7a7ffcfcd1
2011-12-12 02:15:09 -05:00
rupa
cf4b1afd71
document reliance on $PROMPT_COMMAND
2011-08-23 17:32:00 -04:00
rupa
763445330e
allow datafile location to be overriden
2011-08-06 22:46:15 -04:00
rupa
af890aea59
begrudge a duplicated line
2011-08-03 19:47:30 -04:00
rupa
8621b3c498
indentation
2011-08-03 19:26:06 -04:00
rupa
476d469783
another go at removing redundant code from common
2011-08-03 19:12:22 -04:00
rupa
1870f27162
documentation
2011-08-03 17:35:50 -04:00
rupa
544854aa64
revert changes to common pending further thought
2011-08-03 17:33:42 -04:00
rupa
366129af90
stop rewriting the db file when z is used, remove useless code from
...
common()
2011-08-03 17:17:56 -04:00
rupa
cd47da6e03
documentation
2011-08-03 16:43:34 -04:00
rupa
c51a59403d
documentation
2011-08-03 16:42:42 -04:00
rupa
4d8210e8e8
documentation
2011-08-03 16:41:37 -04:00
rupa
a0f58616ec
use a case statement rather than a bash substring, for portability
2011-08-03 16:13:15 -04:00
rupa
3638788227
remove a debug line
2011-08-02 15:51:50 -04:00
rupa
08044a32c5
fix zsh tab completion, which I believe has been broken since 84ace8e8a9
2011-08-02 15:50:46 -04:00
rupa
a508e8360a
add tab completion section to man page
2011-07-25 17:25:47 -04:00
rupa
79dc3f340f
only cd to completions if we've actually tab completed them
...
We decide you've tab completed if the last argument begins with /, and is an
existing directory. This may still cause unexpected behavior if you do that
without tab completing.
2011-07-25 16:46:10 -04:00
rupa
facab80796
add info about how to install the man page as mentioned in #gh-32
2011-07-14 14:57:18 -04:00
rupa
2613c630bd
better error handling for issues 30 and 31
2011-07-10 15:09:15 -04:00
rupa
860fe10fe1
we don't care if awk reports a failure due to no .z file. Closes #31
2011-07-09 21:11:38 -04:00
rupa
dfc42cfba8
minor style change after pulling from Enlik
2011-06-29 16:13:37 -04:00
rupa
979a33744a
Merge pull request #30 from Enlik/master
...
pull request: use actual return status; don't truncate file when disk full
2011-06-29 13:07:21 -07:00
rupa
84ace8e8a9
rename z() to _z(), aliased to z. update manpage and readme.
...
Alias allows cmd to be overriden, and makes it so z prints to STDOUT as
expected. Not well tested on zsh.
2011-06-08 17:06:01 -04:00
rupa
f24af5c4a0
Merge pull request #27 from simonair/master.
...
zsh - correctly complete directories with spaces
2011-05-03 10:27:52 -07:00
rupa
22b68c7e96
use 'test' to check for file ownership. closes #25 . thanks sjmadsen.
2011-04-27 14:30:30 -04:00
rupa
bad41c20ca
better tests for file ownership. closes #24 and #25
2011-04-27 03:19:27 -04:00
rupa
85f1c2e73c
typo
2011-04-14 09:05:55 -04:00
rupa
d96f3c99ec
bail out if we're another user but our env is still from olduser - prevent clobbering our db file
2011-04-14 08:28:08 -04:00
rupa
84837e575f
suppress any errors from PROMPT_COMMAND
2011-04-14 08:08:50 -04:00
rupa
67cd38d05a
remove shebang line. It's not necessary as the script is sourced, and it implies bash only
2011-02-28 17:27:33 -05:00
rupa
30d6eb1b53
add man page, update README to sync with it.
2011-02-23 17:30:18 -05:00
rupa
107fa3e1a8
deal with 'set -C'. closes #16
2011-02-23 15:23:23 -05:00
rupa
c415a22158
license under WTFPL. Closes #13 - I think...
2011-02-19 14:25:20 -05:00
rupa
73edb4969c
docs
2011-02-06 19:12:39 -05:00
rupa
1c1467eafa
readme
2011-02-06 19:04:56 -05:00
rupa
5d6ab0a07f
let's try using env in case people have aliases mv or rm. closes #11
2011-02-06 18:55:51 -05:00
rupa
fe143668c1
only set $PROMPT_COMMAND under bash. Closes #10
2011-01-28 15:30:11 -05:00
rupa
5142b69212
use mktemp to prevent file clobbering (d'oh!). closes #9
2011-01-27 14:22:57 -05:00
rupa
50e01eeba8
supress a rare error from pwd, and formatting
2010-12-16 03:12:04 -05:00
rupa
91c3b9ecd2
variable quoting for $HOME with spaces. seems like it works.
2010-04-06 17:07:20 -04:00
rupa
15d37f8928
should fix issues with spaces in $HOME
2010-03-31 19:29:22 -04:00
rupa
0f7f16b229
smartcase in completions - ie only case sensitive if there is an uppercase letter in search
2010-02-15 15:33:36 -05:00
rupa
10e2de9cf2
make completions case-insensitive
2010-02-15 11:20:51 -05:00
rupa
73e42366ed
typo in README
2010-02-10 14:46:06 -05:00
rupa
8a125d9f3d
make the cd variable local. make PROMPT_COMMAND checking a bit more robust.
2010-02-10 14:40:54 -05:00
rupa
5a5f453f31
more specific enumeration of changes from j
2009-10-13 19:54:41 -04:00
rupa
47c4f3b3d5
minor formatting change in list output
2009-10-13 19:46:37 -04:00
rupa
c373396f0e
Merge branch 'master' of git@github.com:rupa/z
2009-10-13 19:44:37 -04:00
rupa
0904fc4c04
rename the case array to wcase, as gawk can be compiled with support for
...
switch/case, in which event case is a reserved word, and causes errors.
Closes gh-2.
2009-10-13 19:42:10 -04:00
rupa
fee5337242
remove markdown formatting from readme
2009-07-27 12:55:52 -04:00
rupa
151872282f
protect against a malformed regex deleting your
2009-07-21 15:13:38 -04:00
rupa
45dd885e7c
documentation
2009-07-06 15:55:56 -04:00
rupa
eacb0e8cd3
pass tmpfile name to awk in a variable. BSD awk (which OSX appears to use) doesn't like to redirect to concatenated filenames, and FILENAME is not available in the BEGIN clause, which is where i'd like to concatenate it, so this seemed the best approach. Closes gh-1
2009-07-02 12:18:53 -04:00
rupa
66cb4864b0
iphone compatibility - use fd redirects rather than explicitly naming /dev/stderr.
2009-07-02 10:54:49 -04:00
rupa
46bb84b76c
typo
2009-06-26 11:26:07 -04:00
rupa
7e8f0dad3a
documentation
2009-06-26 11:22:25 -04:00
rupa
784eafbc3d
don't complain if isn't there yet
2009-06-26 11:08:36 -04:00
rupa
d81f316371
readme
2009-06-25 18:49:14 -04:00
rupa
2076b13a66
readme
2009-06-25 18:47:05 -04:00
rupa
9cba24cb14
oops missed a var when renaming
2009-06-24 20:05:03 -04:00
rupa
b0d66247eb
changed shortest to short
2009-06-23 12:28:25 -04:00