Skip to content
/ rc-b Public
forked from benavento/rc

Rc — The Plan 9 Shell (Standalone Unix port)

License

Notifications You must be signed in to change notification settings

borkovic/rc-b

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rc — The Plan 9 Shell

Standalone port of Rc shell written by Tom Duff with edit, history and completion support.

Building

In a terminal run:

cd rc
make
make install

Config

Profile

/Users/$USER/.rcrc

Completion

In .rcrc_ define a fn_complete funciton.

fn err { echo $* >[1=2] }

fn complete_history {
	history | sort -u | fzf -0 --header 'History'
}

fn complete_arg {
}

fn complete_command {
	find $path -maxdepth 1 >[2]/dev/null | sed 's/\/.*\///' | sort -u |
        fzf -q '^'^$1 -0 -1 --header 'Commands' --prompt $prompt(1)
}

fn complete {
#err complete: $#* "$"*"
	if(~ $#* 0)
		exit

	latsp=no
	if(~ $"* *^' ')
		lastsp=yes

	*=`{echo $*}
	switch($#*){
	case 0
		complete_history
	case 1
		if(~ $lastsp yes)
			complete_arg $1
		if not
			complete_command $1
	case *
		exit ''
	}
}

Documentation

About

Rc — The Plan 9 Shell (Standalone Unix port)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 85.3%
  • Roff 9.7%
  • C++ 2.9%
  • Yacc 1.5%
  • Makefile 0.6%