Вот здесь выкладываю свои настройки.
.bashrc
Для root'а:
# ~/.bashrc: executed by bash(1) for non-login shells.
# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
#PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022
#PS1="\[\033[1;31m\]\h:\[\033[1;33m\](\w)\[\033[0m\]\[\033[0m\]"
lightblue='\e[1;34m'
lightgreen='\e[1;32m'
lightred='\e[1;31m'
###PS1='\[\033[01;32m\]\u\[\033[01;34m\]-\[\033[01;31m\]\h\[\033[00;34m\]{\[\033[01;34m\]\w\[\033[00;34m\]}\[\033[01;32m\]:\[\033[00m\]'
PS1="\[\033[1;30m\]\t-\[\033[1;31m\]\h:\[\033[1;33m\](\w)\[\033[0m\]\[\033[0m\]"
clear
###echo -e "${lightred}";figlet -c "DEBIAN";
echo -e "${lightgreen}Ядро: \t${lightgreen}" `uname -smr`
echo -e "${lightgreen}ОС: \t ${lightgreen}Debian GNU/Linux ${NC}" `cat /etc/debian_version`
export LESS_TERMCAP_mb=$'\033[01;31m'
export LESS_TERMCAP_md=$'\033[01;31m'
export LESS_TERMCAP_me=$'\033[0m'
export LESS_TERMCAP_se=$'\033[0m'
export LESS_TERMCAP_so=$'\033[01;44;33m'
export LESS_TERMCAP_ue=$'\033[0m'
export LESS_TERMCAP_us=$'\033[01;32m'
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto --group-directories-first'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
alias la='ls $LS_OPTIONS -lah'
alias l='ls $LS_OPTIONS -CF'
#
# Some more alias to avoid making mistakes:
# alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
if [ -f /usr/bin/grc ]; then
alias cvs="grc --colour=auto cvs"
alias diff="grc --colour=auto diff"
alias esperanto="grc --colour=auto esperanto"
alias gcc="grc --colour=auto gcc"
#
# Some more alias to avoid making mistakes:
# alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
if [ -f /usr/bin/grc ]; then
alias cvs="grc --colour=auto cvs"
alias diff="grc --colour=auto diff"
alias esperanto="grc --colour=auto esperanto"
alias gcc="grc --colour=auto gcc"
alias irclog="grc --colour=auto irclog"
alias ldap="grc --colour=auto ldap"
alias log="grc --colour=auto log"
alias netstat="grc --colour=auto netstat"
alias ping="grc --colour=auto ping"
alias proftpd="grc --colour=auto proftpd"
alias traceroute="grc --colour=auto traceroute"
alias wdiff="grc --colour=auto wdiff"
fi
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.tar.xz) tar xvJf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tgz) tar xvzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*.xz) unxz $1 ;;
*.exe) cabextract $1 ;;
*) echo "\`$1': неизвестный метод сжатия файла" ;;
esac
else
echo "\`$1' нет такого файла"
fi
}
Для пользователя:
PS1="\[\033[1;30m\]\t-\[\033[1;32m\]\h:\[\033[1;33m\](\w)\[\033[0m\]\[\033[0m\]"
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'
alias ls='ls $LS_OPTIONS'export LS_OPTIONS='--color=auto --group-directories-first'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
alias la='ls $LS_OPTIONS -lah'
alias l='ls $LS_OPTIONS -CF'
# -вместо "ctrl+a" назначена клавиша <`> (обычно она под esc и над tab),
# так что вместо двух клавиш надо жать одну. Если надо
# набрать <`>, что довольно редко требуется, то надо нажать её два раза подряд.
# -внизу терминала зеленым на чёрном статусная строка показывающая
# активные сессии и часы. Переключение между ними: `1, `2, `3 и т.п., или
# `n (next), `p (previous)
# - для CERN/Lxplus добавление в конец этого файла строк
# # annoying RedHat/SLC backspace problem
# bindkey ^? stuff ^H
# решает проблему с
# - `d => detach session; screen -ls => list of detached session;
# screen -r => reattach session.
#------------------------------------------------------------------------------
# .screenrc file based on http://www.dotfiles.com/files/3/463_screenrc.txt
#------------------------------------------------------------------------------
# SCREEN SETTINGS
#------------------------------------------------------------------------------
escape `` # use ` instesd of Cntr-A
vbell on # default: off
vbell_msg " -- Ring, Ring!! -- " # default: "Wuff,Wuff!!"
autodetach on # default: on
startup_message off # default: on
crlf off # default: off
defscrollback 1024 # default: 100
silencewait 15 # default: 30
msgwait 15
pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."
# change the hardstatus settings to give an window list at the bottom of the
# screen, with the time and date and with the current window highlighted
# caption always "%{=}%?%{b}%H %L=%{+b}%?%{y}%-Lw%47L>%?%{g}%n*%f %t %?%{y}%+Lw%?%{b}%-31=%c %l %Y-%m-%d"
hardstatus alwayslastline
#hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'
hardstatus string '%{= kG} %{G}%H %{g}[%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}]%{D} %d/%m %c %{g}'
#------------------------------------------------------------------------------
# TERMINAL SETTINGS
#------------------------------------------------------------------------------
#the vt100 description does not mention "dl". *sigh*
termcapinfo vt100 dl=5\E[M
termcap vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC
terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC
termcap xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l
terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l
termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l
termcapinfo xterm* OL=100
termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l'
termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~'
termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l'
termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337'
termcapinfo xterm* be
termcapinfo linux C8
#------------------------------------------------------------------------------
# SCREEN KEYBINDINGS
#------------------------------------------------------------------------------
# Remove some stupid / dangerous key bindings
bind k
bind ^k
bind .
bind ^\
bind \\
bind ^h
bind h
bind 'K' kill
bind 'I' login on
bind 'O' login off
bind '}' history
register [ "\033:se noai\015a"
register ] "\033:se ai\015a"
bind ^] paste [.]
bind = resize =
bind + resize +3
bind - resize -3
bind ) select 10
bind ! select 11
bind @ select 12
bind \# select 13
bind \$ select 14
bind % select 15
bind \^ select 16
bind & select 17
bind * select 18
bind ( select 19
logfile ~/logs/screen_%Y-%m-%d_%0c
bindkey -k F1 prev
bindkey -k F2 next
мой /etc/nanorc:
## Sample initialization file for GNU nano.
##
## Please note that you must have configured nano with --enable-nanorc
## for this file to be read! Also note that this file should not be in
## DOS or Mac format, and that characters specially interpreted by the
## shell should not be escaped here.
##
## To make sure a value is disabled, use "unset
##
## For the options that take parameters, the default value is given.
## Other options are unset by default.
##
## Quotes inside string parameters don't have to be escaped with
## backslashes. The last double quote in the string will be treated as
## its end. For example, for the "brackets" option, ""')>]}" will match
## ", ', ), >, ], and }.
## Use auto-indentation.
# set autoindent
## Backup files to filename~.
# set backup
## The directory to put unique backup files in.
# set backupdir ""
## Do backwards searches by default.
# set backwards
## Use bold text instead of reverse video text.
# set boldtext
## The characters treated as closing brackets when justifying
## paragraphs. They cannot contain blank characters. Only closing
## punctuation, optionally followed by closing brackets, can end
## sentences.
##
# set brackets ""')>]}"
## Do case sensitive searches by default.
# set casesensitive
## Constantly display the cursor position in the statusbar. Note that
## this overrides "quickblank".
# set const
## Use cut to end of line by default.
# set cut
## Set the line length for wrapping text and justifying paragraphs.
## If fill is 0 or less, the line length will be the screen width less
## this number.
##
# set fill -8
## Enable ~/.nano_history for saving and reading search/replace strings.
# set historylog
## The opening and closing brackets that can be found by bracket
## searches. They cannot contain blank characters. The former set must
## come before the latter set, and both must be in the same order.
##
# set matchbrackets "(<[{)>]}"
## Use the blank line below the titlebar as extra editing space.
# set morespace
## Enable mouse support, if available for your system. When enabled,
## mouse clicks can be used to place the cursor, set the mark (with a
## double click), and execute shortcuts. The mouse will work in the X
## Window System, and on the console when gpm is running.
##
# set mouse
## Allow multiple file buffers (inserting a file will put it into a
## separate buffer). You must have configured with --enable-multibuffer
## for this to work.
##
# set multibuffer
## Don't convert files from DOS/Mac format.
# set noconvert
## Don't follow symlinks when writing files.
# set nofollow
## Don't display the helpful shortcut lists at the bottom of the screen.
# set nohelp
## Don't add newlines to the ends of files.
# set nonewlines
## Don't wrap text at all.
# set nowrap
## Set operating directory. nano will not read or write files outside
## this directory and its subdirectories. Also, the current directory
## is changed to here, so any files are inserted from this dir. A blank
## string means the operating directory feature is turned off.
##
# set operatingdir ""
## Preserve the XON and XOFF keys (^Q and ^S).
# set preserve
## The characters treated as closing punctuation when justifying
## paragraphs. They cannot contain blank characters. Only closing
## punctuation, optionally followed by closing brackets, can end
## sentences.
##
# set punct "!.?"
## Do quick statusbar blanking. Statusbar messages will disappear after
## 1 keystroke instead of 26. Note that "const" overrides this.
##
# set quickblank
## The email-quote string, used to justify email-quoted paragraphs.
## This is an extended regular expression if your system supports them,
## otherwise a literal string. Default:
# set quotestr "^([ ]*[#:>\|}])+"
## if you have extended regular expression support, otherwise:
# set quotestr "> "
## Fix Backspace/Delete confusion problem.
# set rebinddelete
## Fix numeric keypad key confusion problem.
# set rebindkeypad
## Do extended regular expression searches by default.
# set regexp
## Make the Home key smarter. When Home is pressed anywhere but at the
## very beginning of non-whitespace characters on a line, the cursor
## will jump to that beginning (either forwards or backwards). If the
## cursor is already at that position, it will jump to the true
## beginning of the line.
# set smarthome
## Use smooth scrolling as the default.
# set smooth
## Use this spelling checker instead of the internal one. This option
## does not properly have a default value.
##
# set speller "aspell -x -c"
## Allow nano to be suspended.
# set suspend
## Use this tab size instead of the default; it must be greater than 0.
# set tabsize 8
## Convert typed tabs to spaces.
# set tabstospaces
## Save automatically on exit, don't prompt.
# set tempfile
## Disallow file modification; why would you want this in an rcfile? ;)
# set view
## The two single-column characters used to display the first characters
## of tabs and spaces. 187 in ISO 8859-1 (0000BB in Unicode) and 183 in
## ISO-8859-1 (0000B7 in Unicode) seem to be good values for these.
# set whitespace " "
## Detect word boundaries more accurately by treating punctuation
## characters as part of a word.
# set wordbounds
## Default - makes ## as comment
include "/usr/share/nano/default.nanorc"
## Emacs
include "/usr/share/nano/dotemacs.nanorc"
## C++
include "/usr/share/nano/c.nanorc"
## C
include "/usr/share/nano/c-file.nanorc"
## Pov-Ray
include "/usr/share/nano/pov.nanorc"
## HTML
#there is better one in xml.nanorc
# include "/usr/share/nano/html.nanorc"
## TeX
include "/usr/share/nano/tex.nanorc"
## Quoted emails (under e.g. mutt)
include "/usr/share/nano/mutt.nanorc"
## Patch files
include "/usr/share/nano/patch.nanorc"
## Manpages
include "/usr/share/nano/man.nanorc"
## Groff
include "/usr/share/nano/groff.nanorc"
## Perl
include "/usr/share/nano/perl.nanorc"
## Python
include "/usr/share/nano/python.nanorc"
## Ruby
include "/usr/share/nano/ruby.nanorc"
## Java
include "/usr/share/nano/java.nanorc"
## Assembler
include "/usr/share/nano/asm.nanorc"
## Bourne shell scripts
include "/usr/share/nano/sh.nanorc"
## Gentoo ebuilds and such
include "/usr/share/nano/gentoo.nanorc"
## PHP something missing in there...
#include "/usr/share/nano/php.nanorc"
## PHP
include "/usr/share/nano/php2.nanorc"
## Xorg config
include "/usr/share/nano/xorg.nanorc"
## XML
include "/usr/share/nano/xml.nanorc"
## URLS
include "/usr/share/nano/urls.nanorc"
## CSS
include "/usr/share/nano/css.nanorc"
## Conky
include "/usr/share/nano/conky.nanorc"
## .cf
include "/usr/share/nano/maincf.nanorc"
## *rc - catches more files for now
#include "/usr/share/nano/rcfiles.nanorc"
## *rc
include "/usr/share/nano/rcfiles-new.nanorc"
## profile
include "/usr/share/nano/profile.nanorc"
## java script
include "/usr/share/nano/js.nanorc"
## configs
include "/usr/share/nano/configfiles.nanorc"
## Xstuff
include "/usr/share/nano/xdefaults.nanorc"
## configs
include "/usr/share/nano/config.nanorc"
## configs
include "/usr/share/nano/config2.nanorc"
## configs
include "/usr/share/nano/config3.nanorc"
## configs
include "/usr/share/nano/tab.nanorc"
## configs
include "/usr/share/nano/passwd.nanorc"
include "/usr/share/nano/desc.nanorc"
## Delphi
include "/usr/share/nano/delphi.nanorc"
# ChangeLog - colors everything in blue
#include "/usr/share/nano/changelog.nanorc"
## ChangeLog (C)ryszardzonk
include "/usr/share/nano/changelogs.nanorc"
## video metadata info (C)ryszardzonk
include "/usr/share/nano/info.nanorc"
## configs in /etc (C)ryszardzonk
include "/usr/share/nano/etc-stuff.nanorc"
## logs in /var/log (C)ryszardzonk
include "/usr/share/nano/log-stuff.nanorc"
## nanorc syntax
include "/usr/share/nano/nanorc.nanorc"
## *.po files (C)ryszardzonk
include "/usr/share/nano/po.nanorc"
## Apache 2
include "/usr/share/nano/apache2.nanorc"
## Apache 2 Virtual Host
include "/usr/share/nano/vhost.nanorc"
## /etc/init.d/* custom gentoo.nanorc
include "/usr/share/nano/initscript.nanorc"
## Named (C)ryszardzonk
include "/usr/share/nano/named.nanorc"
## File Types (C)ryszardzonk
include "/usr/share/nano/mimetype.nanorc"
## /etc/initng/ custom sh.nanorc
include "/usr/share/nano/initng.nanorc"
## /etc/xml custom xml.nanorc
include "/usr/share/nano/etcxml.nanorc"
## sh.nanorc syntax for custom files
include "/usr/share/nano/shlike.nanorc"
## c.nanorc syntax for custom files
include "/usr/share/nano/clike.nanorc"
## EKG History view (C)ryszardzonk
include "/usr/share/nano/ekghistory.nanorc"
## others (C)ryszardzonk
include "/usr/share/nano/others.nanorc"
## others (C)ryszardzonk + LinuxHelp Wiki
include "/usr/share/nano/makefile.nanorc"
## postegreSQL
## postegreSQL
include "/usr/share/nano/postgresql.nanorc"
## Debian Sources (off by default)
#include "/usr/share/nano/sources_list.nanorc"
## SoftCam.Key mgcamd
include "/usr/share/nano/softcam.nanorc"
## Paludis http://gentoo-wiki.com/TIP_Nano_Context_Highlighting
include "/usr/share/nano/paludis.nanorc"
## HAVP config (C)ryszardzonk
include "/usr/share/nano/havp.nanorc"
## Privoxy (C)ryszardzonk
include "/usr/share/nano/privoxy.nanorc"
## Asterisk syntax highlighting
include "/usr/share/nano/asterisk.nanorc"
Комментариев нет:
Отправить комментарий