summaryrefslogtreecommitdiff
path: root/toys/navigator/README.adoc
blob: 7d0b2386f0624c3bf887924dbe88533ca22532c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Directory navigator
===================
This is a prototype of a shell directory navigator that you can invoke while
you're editing commands.  It enables you to:

 * take a quick look at directory contents without running `ls`
 * browse the filesystem without all the mess that Midnight Commander does:
   there's no need to create a subshell in a new pty.  The current command line
   can be simply forwarded if it is to be edited.  What's more, it will always
   be obvious whether the navigator is running.

It would be a decent idea to create a clone of MC named Dusk Commander, however
the time investment would be significant, and a GUI is more desirable.

zsh
---
To start using this navigator, put the following in your .zshrc:
....
navigate () {
	# ... possibly zle-line-init
	eval `navigator`
	[ -z "$cd" ] || cd "$cd"
	[ -z "$insert" ] || LBUFFER="$LBUFFER$insert "
	zle reset-prompt
	# ... possibly zle-line-finish
}
zle -N navigate
bindkey '\eo' navigate
....