Skip to content

Commit

Permalink
Merge commit 'b9afd5faaddd62067a5f37084c35476e8b2e4cc8'
Browse files Browse the repository at this point in the history
Conflicts:
	z.1
	z.sh

knu-z uses _z_cmd --del for implmenting this.
  • Loading branch information
knu committed Jun 24, 2013
2 parents 72b8498 + b9afd5f commit ed81792
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
6 changes: 4 additions & 2 deletions README
Expand Up @@ -4,7 +4,7 @@ NAME
z -- jump around

SYNOPSIS
z [-hclrt] [string ...]
z [-hclrtx] [string ...]

AVAILABILITY
bash, zsh
Expand Down Expand Up @@ -46,6 +46,8 @@ OPTIONS

-t Sort by recency instead of `frecency'.

-x Remove the current directory from the datafile.

Nonexistent directories are omitted from output and ignored in moving and
completion but kept in database for future use.

Expand Down Expand Up @@ -188,4 +190,4 @@ HISTORY
BUGS
Please file bugs at <https://github.com/knu/z>.

Unix March 13, 2013 Unix
Unix June 24, 2013 Unix
6 changes: 4 additions & 2 deletions src/z.cli.sh
Expand Up @@ -96,20 +96,22 @@ case "$1" in
# list/go
local opt OPTIND=1
local list rev typ fnd cd limit
while getopts hclrt opt; do
while getopts hclrtx opt; do
case "$opt" in
c) fnd="/$PWD/";;
l) list=1;;
r) typ="rank";;
t) typ="recent";;
x) _z_cmd --del "$PWD";;
*) cat <<EOF >&2
$_Z_CMD [-clrt] [args...]
$_Z_CMD [-clrtx] [args...]
-h show this help
-c restrict matches to subdirectories of the current directory
-l list dirs (matching args if given)
-r sort dirs by rank
-t sort dirs by recency
-x remove the current directory from the datafile
Omitting args implies -l.
EOF
Expand Down
7 changes: 5 additions & 2 deletions z.1
@@ -1,12 +1,12 @@
.Dd March 13, 2013
.Dd June 24, 2013
.Dt Z \&1 "User Commands Manual"
.Os Unix
.Sh NAME
.Nm z
.Nd jump around
.Sh SYNOPSIS
.Nm z
.Op Fl hclrt
.Op Fl hclrtx
.Op Ar string ...
.Sh AVAILABILITY
bash, zsh
Expand Down Expand Up @@ -74,6 +74,9 @@ Sort by rank instead of
.It Fl t
Sort by recency instead of
.Sq frecency .
.Pp
.It Fl x
Remove the current directory from the datafile.
.El
.Pp
Nonexistent directories are omitted from output and ignored in moving
Expand Down
6 changes: 4 additions & 2 deletions z.sh
Expand Up @@ -135,20 +135,22 @@ _z_cmd () {
# list/go
local opt OPTIND=1
local list rev typ fnd cd limit
while getopts hclrt opt; do
while getopts hclrtx opt; do
case "$opt" in
c) fnd="/$PWD/";;
l) list=1;;
r) typ="rank";;
t) typ="recent";;
x) _z_cmd --del "$PWD";;
*) cat <<EOF >&2
$_Z_CMD [-clrt] [args...]
$_Z_CMD [-clrtx] [args...]
-h show this help
-c restrict matches to subdirectories of the current directory
-l list dirs (matching args if given)
-r sort dirs by rank
-t sort dirs by recency
-x remove the current directory from the datafile
Omitting args implies -l.
EOF
Expand Down

0 comments on commit ed81792

Please sign in to comment.