~mdw
/
profile
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
el/dot-emacs.el: Configure `glasses' mode.
[profile]
/
dot
/
rcrc
diff --git
a/dot/rcrc
b/dot/rcrc
index
39d9435
..
adc607e
100644
(file)
--- a/
dot/rcrc
+++ b/
dot/rcrc
@@
-4,42
+4,45
@@
###--------------------------------------------------------------------------
### Prompt machinery.
###--------------------------------------------------------------------------
### Prompt machinery.
-host = `
hostname
+host = `
{hostname}
if (~ $TERM linux* screen* xterm* vt100* eterm*) {
bold = `{tput bold} unbold = `{tput sgr0}
if (~ $TERM linux* screen* xterm* vt100* eterm*) {
bold = `{tput bold} unbold = `{tput sgr0}
-}
else
{
+}
; if not
{
bold = '' unbold = ''
}
if (~ `{id -u} 0) {
bold = '' unbold = ''
}
if (~ `{id -u} 0) {
- left = `{
iconv -f utf8 -t //translit <<< «
}
- right = `{
iconv -f utf8 -t //translit <<< »
}
-}
else
{
+ left = `{
echo « | iconv -f utf8 -t //translit
}
+ right = `{
echo » | iconv -f utf8 -t //translit
}
+}
; if not
{
u = `{id -un}
if (~ $u mdw mwooding) {
u = '' left = '[' right = ']'
u = `{id -un}
if (~ $u mdw mwooding) {
u = '' left = '[' right = ']'
- }
else
{
+ }
; if not
{
u = $u^@ left = '{' right = '}'
}
u = $u^@ left = '{' right = '}'
}
- if (~ $__mdw_tty `
tty
) {
+ if (~ $__mdw_tty `
{tty}
) {
left = '<' right = '>'
left = '<' right = '>'
- }
else
{
- __mdw_tty = `
tty
+ }
; if not
{
+ __mdw_tty = `
{tty}
}
}
if (~ $#SSH_CLIENT 0 && ! ~ $__mdw_sechost $host) {
sec_l = '(' sec_r = ')'
}
}
if (~ $#SSH_CLIENT 0 && ! ~ $__mdw_sechost $host) {
sec_l = '(' sec_r = ')'
+}; if not {
+ sec_l = '' sec_r = ''
}
fn prompt {
}
fn prompt {
- cwd = `
pwd
+ cwd = `
{pwd}
if (~ $cwd $home $home/*) {
if (~ $cwd $home $home/*) {
- cwd = `{
sed 's:^' ^ $home ^':~:' <<< $cwd
}
+ cwd = `{
echo $cwd | sed 's:^' ^ $home ^':~:'
}
}
prompt = ($bold$left$sec_l$u$host$sec_r^' '^$cwd$right$unbold '')
}
}
prompt = ($bold$left$sec_l$u$host$sec_r^' '^$cwd$right$unbold '')
}
+prompt
###--------------------------------------------------------------------------
### Convenient aliases.
###--------------------------------------------------------------------------
### Convenient aliases.
@@
-54,7
+57,7
@@
fn @ { ssh $* }
fn ls {
if (test -t 1) {
builtin ls $LS_OPTIONS '--color=auto' $*
fn ls {
if (test -t 1) {
builtin ls $LS_OPTIONS '--color=auto' $*
- }
else
{
+ }
; if not
{
builtin ls $*
}
}
builtin ls $*
}
}
@@
-63,7
+66,7
@@
fn greplike {
grep = $1; shift
if (test -t 1) {
builtin $grep '--color=always' $* | mdw-pager
grep = $1; shift
if (test -t 1) {
builtin $grep '--color=always' $* | mdw-pager
- }
else
{
+ }
; if not
{
builtin grep $*
}
}
builtin grep $*
}
}