Thanks to visit codestin.com
Credit goes to github.com

Skip to content

frobnitzem/rcrc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User environment setup for rc

Documentation for rc is here

There's a plethora of useful things here:

  • rcrc - start-up script adding a nice prompt, pushd,popd,activate,deactivate activate and deactivate maintain a stack of VIRTUAL_ENV variables like pushd and popd. Internally, all the implementations use rc lists (path_history and venv_history, respectively).

    cp rcrc $HOME/.rcrc

  • profile.rc - some other helpful functions (lmod support)

  • vim/ - vim plugins to recognize rc scripts

    mkdir -p $HOME/.vim/ftdetect cp vim/ftdetect/rcshell.vim $HOME/.vim/ftdetect mkdir -p $HOME/.vim/syntax cp vim/syntax/rcshell.vim $HOME/.vim/syntax

  • bin/* - various useful scripts

    mkdir $HOME/bin path = ($path $HOME/bin) cp bin/* $HOME/bin/

Associated Projects

If you enjoy the rc shell, you might also like to try other 9P applications available inside plan9port.

The mk build system is especially notable. Also, the factotum+secstore+secstored triad makes a full featured password manager that even has ssh integration.

The Revenge of Plan9

The push toward reliable containerization technology has made modern Linux able to provide many of the key features of Plan9.

Note especially the following projects:

HOWTO

  1. install plan9port

    then copy plan9port/bin/9 to $home/bin/9 and set its PLAN9 accordingly.

Use Factotum

9 factotum

Interact with 9p following factotum protocol.

% 9 9p ls factotum/
confirm
conv
ctl
log
needkey
proto
rpc

Add a key

% 9 9p write factotum/ctl
> key role=client proto=pass service=ssh user=99r dom=ornl !password=12345

Lookup a key

% 9 9p rdwr factotum/rpc
> start proto=pass role=client service=ssh user=99r
< ok / error string
> read
< ok 99r 12345

Note this will return any matching key. If no key is present, it may return with, e.g.

needkey user? !password? proto=pass role=client service=ssh dom=olcf

Sending another read will return either error or ok <data> (if the needkey process supplied the needed key), as in the following,

start proto=pass role=client service=ssh dom=olcf
ok
read
needkey user? !password? proto=pass role=client service=ssh dom=olcf
read
error pass client nascent: no key found
start proto=pass role=client service=ssh dom=olcf
ok
read
needkey user? !password? proto=pass role=client service=ssh dom=olcf
read
ok a ok

Serve a key request:

% 9 9p rdwr factotum/needkey
< needkey tag=tagno <template>
[add key via factotum/ctl]
> tag=tagno

Interacting with GNU pinentry

% pinentry -g
OK Pleased to meet you
SETPROMPT Password required for code.ornl.gov
OK
GETPIN
D nope
OK
GETPIN
ERR 83886179 Operation cancelled <Pinentry>

Providing "nope" on the first entry and pressing "Cancel" on the second.

About

rc shell profile

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published