Simplified rc files.
This commit is contained in:
parent
9707225cea
commit
183979f253
6 changed files with 54 additions and 77 deletions
|
@ -1,4 +1,8 @@
|
||||||
test -r "$LOGIN" && . "$LOGIN"
|
q(){
|
||||||
test -r "$SETENV" && . "$SETENV" && setenv bash
|
echo $SHLVL - 1 | bc
|
||||||
|
exit
|
||||||
|
}
|
||||||
export PS1="$SHPROMPT"
|
export PS1="$SHPROMPT"
|
||||||
|
|
||||||
|
test -r "$LOGIN" && . "$LOGIN"
|
||||||
|
test -r "$SETENV" && . "$SETENV" && setenv bash
|
||||||
|
|
|
@ -22,51 +22,30 @@ q(){
|
||||||
# Standard variables.
|
# Standard variables.
|
||||||
export_loop \
|
export_loop \
|
||||||
ENV '$HOME/.shrc' \
|
ENV '$HOME/.shrc' \
|
||||||
DEV '$HOME/dev' \
|
PS1 '"% "' \
|
||||||
LIB '$HOME/lib' \
|
|
||||||
IMG '$HOME/img' \
|
|
||||||
SND '$HOME/snd' \
|
|
||||||
DOC '$HOME/doc' \
|
|
||||||
VID '$HOME/vid' \
|
|
||||||
LOAD '$HOME/load' \
|
|
||||||
TXT '$HOME/txt' \
|
|
||||||
SHR '$HOME/shr' \
|
|
||||||
MNT '$HOME/mnt' \
|
|
||||||
PUB '$HOME/pub' \
|
|
||||||
TMP '$HOME/tmp' \
|
|
||||||
EXE '$HOME/exe' \
|
|
||||||
SHPROMPT '"% "' \
|
|
||||||
PS1 '"$SHPROMPT"' \
|
|
||||||
SUDO_PROMPT '"#"' \
|
SUDO_PROMPT '"#"' \
|
||||||
EDITOR 'ed' \
|
EDITOR 'vi' \
|
||||||
INDENT ' ' \
|
|
||||||
VISUAL 'vi' \
|
VISUAL 'vi' \
|
||||||
GIT_EDITOR '$VISUAL' \
|
GIT_EDITOR '$VISUAL' \
|
||||||
PAGER 'less' \
|
PAGER 'less' \
|
||||||
MANPAGER '$PAGER' \
|
MANPAGER '$PAGER' \
|
||||||
MAN '$SHR/man' \
|
\
|
||||||
PROFILE '$HOME/.profile' \
|
PROFILE '$HOME/.profile' \
|
||||||
TMPL '$HOME/tmpl' \
|
|
||||||
APP '$HOME/app' \
|
|
||||||
ENVDIR '$HOME/env' \
|
ENVDIR '$HOME/env' \
|
||||||
SETENV '$LIB/setenv/sh' \
|
SETENV '$HOME/lib/setenv/sh' \
|
||||||
GOPATH '$APP/go' \
|
LOGIN '$HOME/lib/login/sh' \
|
||||||
GOBIN '$EXE'\
|
INDENT '" "'\
|
||||||
COMPOSEREXE '$LIB/composer/vendor/bin' \
|
\
|
||||||
VPATH '$APP/v'\
|
GOPATH '$HOME/app/go' \
|
||||||
VEXE '$VPATH'\
|
GOBIN '$HOME/exe'\
|
||||||
PLAN9BASE '/usr/local/plan9' \
|
COMPOSEREXE '$HOME/lib/composer/vendor/bin' \
|
||||||
PLAN9PORT '$APP/plan9' \
|
XDG_CONFIG_HOME '$HOME/lib' \
|
||||||
PLAN9 '$PLAN9PORT' \
|
XDG_RUNTIME_DIR '$HOME/tmp' \
|
||||||
INFERNO '$APP/inferno' \
|
XDG_DATA_HOME '$HOME/app' \
|
||||||
XDG_CONFIG_HOME '$LIB' \
|
XCOMPOSEFILE '$HOME/lib/xcompose' \
|
||||||
XDG_RUNTIME_DIR '$TMP' \
|
ANDROID_NDK_HOME '$HOME/app/android/ndk' \
|
||||||
XDG_DATA_HOME '$APP' \
|
|
||||||
XCOMPOSEFILE '$LIB/xcompose' \
|
|
||||||
ANDROID_NDK_HOME '$APP/android/ndk' \
|
|
||||||
LOGIN '$LIB/login/sh' \
|
|
||||||
GIT 'https://github.com/$USER' \
|
GIT 'https://github.com/$USER' \
|
||||||
PATH '$EXE:$PATH:$GOEXE:$PLAN9BASE/bin:$PLAN9PORT/bin:$VEXE:$COMPOSEREXE' \
|
PATH '$HOME/exe:$PATH' \
|
||||||
|
|
||||||
test -r $SETENV && . "$SETENV" && setenv profile
|
test -r $SETENV && . "$SETENV" && setenv profile
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
q(){
|
||||||
|
echo $SHLVL - 1 | bc
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
test -r "$LOGIN" && . "$LOGIN"
|
test -r "$LOGIN" && . "$LOGIN"
|
||||||
PS1="$SHPROMPT"
|
PS1="$SHPROMPT"
|
||||||
test -r "$SETENV" && . "$SETENV" && setenv sh
|
test -r "$SETENV" && . "$SETENV" && setenv sh
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
autoload -Uz compinit promptinit
|
#autoload -Uz compinit promptinit
|
||||||
compinit
|
#compinit
|
||||||
promptinit
|
#promptinit
|
||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu select
|
||||||
zstyle ':completion:*:manuals' separate-sections true
|
zstyle ':completion:*:manuals' separate-sections true
|
||||||
zstyle ':completion:*:manuals.*' insert-sections true
|
zstyle ':completion:*:manuals.*' insert-sections true
|
||||||
|
@ -29,6 +29,7 @@ setopt nobeep
|
||||||
setopt noglobdots
|
setopt noglobdots
|
||||||
setopt noshwordsplit
|
setopt noshwordsplit
|
||||||
test -r "$LOGIN" && . "$LOGIN"
|
test -r "$LOGIN" && . "$LOGIN"
|
||||||
PROMPT="$SHPROMPT"
|
export PROMPT="%# "
|
||||||
|
q(){echo $SHLVL - 1 | bc ; exit}
|
||||||
test -r "$SETENV" && . "$SETENV" && setenv zsh
|
test -r "$SETENV" && . "$SETENV" && setenv zsh
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,12 @@ function fish_prompt --description "Write out the prompt"
|
||||||
echo -n $SHPROMPT
|
echo -n $SHPROMPT
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Easy quit.
|
||||||
|
function q
|
||||||
|
echo $SHLVL - 1 | bc
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
|
||||||
# Right prompt.
|
# Right prompt.
|
||||||
function fish_right_prompt
|
function fish_right_prompt
|
||||||
# Fuck this.
|
# Fuck this.
|
||||||
|
@ -18,23 +24,9 @@ set -l color_cwd
|
||||||
set -l suffix
|
set -l suffix
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
|
set fish_color_comment yellow
|
||||||
# Less colors
|
set fish_color_error grey
|
||||||
export LESS_TERMCAP_md=(perl -e "print \"\033[1;31m\"")
|
set fish_color_operator $color_cwd
|
||||||
export LESS_TERMCAP_me=(perl -e "print \"\033[0m\"")
|
set fish_color_autosuggestion "brgrey"
|
||||||
# Underlined
|
set fish_color_command "--bold"
|
||||||
export LESS_TERMCAP_us=(perl -e "print \"\033[1;32m\";")
|
|
||||||
export LESS_TERMCAP_ue=(perl -e "print \"\033[0m\"; ")
|
|
||||||
# Service info
|
|
||||||
export LESS_TERMCAP_so=(perl -e "print \"\033[1;33m\";")
|
|
||||||
export LESS_TERMCAP_se=(perl -e "print \"\033[0m\";")
|
|
||||||
# Blinking color
|
|
||||||
export LESS_TERMCAP_mb=(perl -e "print \"\033[1;32m\";")
|
|
||||||
export LESS_TERMCAP_me=(perl -e "print \"\033[0m\";")
|
|
||||||
# Fish colors
|
|
||||||
set fish_color_comment yellow
|
|
||||||
set fish_color_error grey
|
|
||||||
set fish_color_operator $color_cwd
|
|
||||||
set fish_color_autosuggestion "brgrey"
|
|
||||||
set fish_color_command "--bold"
|
|
||||||
|
|
||||||
|
|
24
profile
24
profile
|
@ -1,5 +1,7 @@
|
||||||
# k1574's rc configuration file.
|
# k1574's rc configuration file.
|
||||||
|
|
||||||
|
SHLVL = `{echo $SHLVL + 1 | bc}
|
||||||
|
|
||||||
oldifs = $ifs
|
oldifs = $ifs
|
||||||
prompt = '% ' # The simplest possible prompt.
|
prompt = '% ' # The simplest possible prompt.
|
||||||
fn % {
|
fn % {
|
||||||
|
@ -32,6 +34,7 @@ git = https://github.com/$USER
|
||||||
pager = less # Pager deleting all ESC-sequences. For 9term mostly.
|
pager = less # Pager deleting all ESC-sequences. For 9term mostly.
|
||||||
manpager = $pager # Pager for man pages.
|
manpager = $pager # Pager for man pages.
|
||||||
profile = $0 # Profile file.
|
profile = $0 # Profile file.
|
||||||
|
indent = ' ' # Indent for programming.
|
||||||
|
|
||||||
inferno = $app/inferno # Inferno.
|
inferno = $app/inferno # Inferno.
|
||||||
infernoexe = `{ # Inferno executables files.
|
infernoexe = `{ # Inferno executables files.
|
||||||
|
@ -44,19 +47,17 @@ infernoexe = `{ # Inferno executables files.
|
||||||
}
|
}
|
||||||
|
|
||||||
plan9 = $app/plan9 # Plan9.
|
plan9 = $app/plan9 # Plan9.
|
||||||
plan9exe= $plan9/bin # Plan9 bnaries.
|
plan9exe= $plan9/bin # Plan9 exe files.
|
||||||
gopath = $app/go # Golang path.
|
gopath = $app/go # Golang path.
|
||||||
goexe = $gopath/bin # Golang binaries.
|
|
||||||
vpath = $app/v # VLang binaries and scripts.
|
vpath = $app/v # VLang binaries and scripts.
|
||||||
vexe = $vpath
|
vexe = $vpath # VLang executives.
|
||||||
setenv = $lib/setenv/rc # Setting environment script.
|
setenv = $lib/setenv/rc # Setting environment script.
|
||||||
composerexe = $lib/composer/vendor/bin
|
composerexe = $lib/composer/vendor/bin # PHP executive shit.
|
||||||
font = $plan9/font/fixed/unicode.9x15.font # The standard font for Plan9 program.
|
editor = vi
|
||||||
editor = ed
|
|
||||||
shell = rc
|
shell = rc
|
||||||
|
|
||||||
path = ( $exe $path $goexe $plan9exe $infernoexe $vexe $composerexe )
|
path = ( $home/exe $path $home $plan9exe $infernoexe $vexe $composerexe )
|
||||||
# Pretend path from growing because of running many "rc"s.
|
# Prevent path from growing because of running many "rc"s.
|
||||||
if(which goblin >/dev/null >[2=1]){
|
if(which goblin >/dev/null >[2=1]){
|
||||||
path = `{
|
path = `{
|
||||||
{ for( i in $path) echo $i } | goblin uniq -U
|
{ for( i in $path) echo $i } | goblin uniq -U
|
||||||
|
@ -93,12 +94,6 @@ case ( Linux NetBSD DragonFly OpenBSD FreeBSD ) # On Unix-like systems.
|
||||||
LESS_TERMCAP_mb = `{ perl -e 'print "\033[1;32m" ;' }
|
LESS_TERMCAP_mb = `{ perl -e 'print "\033[1;32m" ;' }
|
||||||
LESS_TERMCAP_me = `{ perl -e 'print "\033[0m" ;' }
|
LESS_TERMCAP_me = `{ perl -e 'print "\033[0m" ;' }
|
||||||
}
|
}
|
||||||
# Pager.
|
|
||||||
PAGER = $pager
|
|
||||||
MANPAGER = $manpager
|
|
||||||
# Editor.
|
|
||||||
EDITOR = $editor
|
|
||||||
user = $USER
|
|
||||||
case *
|
case *
|
||||||
# Nothing in non-Unix systems.
|
# Nothing in non-Unix systems.
|
||||||
}
|
}
|
||||||
|
@ -173,6 +168,7 @@ fn e {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn q {
|
fn q {
|
||||||
|
echo $SHLVL - 1 | bc
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue