projects
/
selector.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d358d7c
)
Typos + added two examples.
author
Francois Fleuret
<francois@fleuret.org>
Mon, 6 Jul 2009 06:08:19 +0000
(08:08 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Mon, 6 Jul 2009 06:08:19 +0000
(08:08 +0200)
selector.1
patch
|
blob
|
history
diff --git
a/selector.1
b/selector.1
index
4be2622
..
042c1fb
100644
(file)
--- a/
selector.1
+++ b/
selector.1
@@
-60,13
+60,13
@@
case-insensitive modes.
.SH "OPTIONS"
.TP
\fB-h\fR
.SH "OPTIONS"
.TP
\fB-h\fR
-display help and exit
s
+display help and exit
.TP
\fB-m\fR
force the monochrome mode
.TP
\fB-i\fR
.TP
\fB-m\fR
force the monochrome mode
.TP
\fB-i\fR
-
in
vert the order of the lines
+
re
vert the order of the lines
.TP
\fB-b\fR
remove the numeric prefix from bash history
.TP
\fB-b\fR
remove the numeric prefix from bash history
@@
-120,10
+120,21
@@
specify a file to search into (option kept for compatibility reasons)
.SH "EXAMPLE"
.SH "EXAMPLE"
-To use selector to search into your bash history
, you can use
+To use selector to search into your bash history
.B selector -q -b -i -d -v -w -l ${HISTSIZE} <(history)
.B selector -q -b -i -d -v -w -l ${HISTSIZE} <(history)
+To show a list of directories and insert a cd command to the selected
+one (using @ as a separator)
+
+.B selector -v -x @ <(find . -type d | awk \(aq{print $1\(dq@cd \(dq$0}\(aq)
+
+To select a line in a long text and returns the line number (this
+command uses ^A as a separator, hence there will be problems if the
+file contains ^A)
+
+.B selector -v -x ^A <(awk < something.txt \(aq{ print $0\(dq^A\(dqNR }\(aq)
+
.SH "KEYBINDING IN BASH"
You can associate selector to a single key in bash by using the
.SH "KEYBINDING IN BASH"
You can associate selector to a single key in bash by using the
@@
-131,7
+142,7
@@
command 'bind' in your bash initialization file. For instance, to
associate it to M-r (that is, the "Alt" and "r" key pressed together),
just add something like
associate it to M-r (that is, the "Alt" and "r" key pressed together),
just add something like
-bind
'"\\C-[r":"\\C-a\\C-kselector -q -b -i -d -v -w -l ${HISTSIZE} <(history)\\C-m"'
+bind
\(aq\(dq\\C-[r\(dq:\(dq\\C-a\\C-kselector -q -b -i -d -v -w -l ${HISTSIZE} <(history)\\C-m\(dq\(aq
in your
.IR ~/.bashrc .
in your
.IR ~/.bashrc .