#!/bin/rc # Plan 9 rc shell configuration # Sourced via $rcrc environment variable home=$HOME user=$USER # Plan 9 tools if(test -d /usr/local/plan9){ PLAN9=/usr/local/plan9 path=($PLAN9/bin $path) } # PATH as list path=($home/.local/bin /usr/local/bin /usr/bin /bin $path) # Editor EDITOR=acme PAGER=nobs # Font font=/lib/font/bit/gomono/Go-Mono.14.font # Prompt prompt=('% ' ' ') # Special characters nl=' ' tab=' ' # cd with directory tracking prevdir=$home fn cd { if(~ $1 '-') builtin cd $prevdir if not { if(! ~ $prevdir $*) prevdir=`{pwd} builtin cd $* } # update acme window label if in acme if(test -f /dev/label) echo -n `{pwd}/- > /dev/label >[2]/dev/null } # Source config modules . $home/.config/.plan9/aliases.rc . $home/.config/.plan9/functions.rc # Machine-specific overrides if(test -f $home/.config/.plan9/local.rc) . $home/.config/.plan9/local.rc # Plan 9 service startup (plan9port) if(~ $#PLAN9 1){ mkdir -p $NAMESPACE if(! test -e $NAMESPACE/font) fontsrv & if(! test -e $NAMESPACE/plumb) plumber & } # Interactive setup if(flag i){ fn sigexit { } }