LINUX.ORG.RU

Проблемы с Zsh


0

0

Привет всем!!
Я установил себе новую оболочку zsh-4.1.1.И у меня возникли кое какие проблемы:
1.Руссие буквы отображаться не хотят.При чтении каталога вылетают длинные слова из английских 
букв разбавленных знаками "\|?/".Некоторые введенные буквы(русские) отображаются,а некоторые нет.
2.Как организовать автодополнение с подсказкай.
3.Не работает подсветка сиснтаксиса в VIM.Все скрипты одного цвета.
4.Поведение клавиш Backspace странное.Она удаляет символы стоящие после курсора.
И еще оди вопрос.Можно ли передать алиасу параметр,т.е. введя например 
#inskern name
zsh делал ядро,модули,копировал bzImage в /boot/vmlinuz-name и делал initrd-name.img.
Это можно написать и скриптом,но мне хочется узнать способ с zsh.
З.Ы.Система RH9.Ядро 2.6.3.Заранее спасибо.

По поводу алиаса не знаю.
Вот мой ~/.vimrc: (секцию langmap я убрал)

set vb ic hls ruler linebreak autoindent 
  syntax on
  set hlsearch
  filetype plugin indent on
  autocmd FileType text setlocal textwidth=78
  set autoindent		" always set autoindenting on


Ниже идет мой ~/.zshrc, сделан на основе выдранного из Alt-линукса.



# /etc/zshrc is sourced in interactive shells.  It
# should contain commands to set up aliases, functions,
# options, key bindings, etc.
#
umask 027

# Set up aliases, this may confuse gurus but well after all gurus now
# how to remove alias.
alias ckmd5='md5sum -c CHECKSUMS.md5 | grep -v OK'
alias ispell='ispell -d russian'
alias startx='cd; startx'
alias ..='cd ..'
alias ...='cd ..;cd ..'
alias ....='cd ..;cd ..;cd ..'
alias ls='ls -p --color'
alias "ls -s"='ls -sh'
alias ll='ls -p -lh --color'
alias la='ls -p -ah --color'
alias mute='aumix -v M'
alias unmute='aumix -v u'
alias df='df -h'
alias mv='nocorrect mv -i'       # no spelling correction on mv
alias cp='nocorrect cp -i'       # no spelling correction on cp
alias rm='nocorrect rm'       # no spelling correction on rm
alias mkdir='nocorrect mkdir' # no spelling correction on mkdir
alias du='du -h'
alias cal='cal -m'
alias 'ls -l'='ls -lh'
alias 'ls -s'='ls -sh'
alias dir='ls --color=none -ha | less'
alias ping='ping -c 1'
#alias halt='sudo /sbin/halt'
#alias reboot='sudo /sbin/reboot'
#alias ppp-go='sudo /usr/sbin/ppp-go'
#alias ppp-off='sudo /usr/sbin/ppp-off'
alias cdrecord='sudo cdrecord'



# zftp settings
fpath=(~/down/ftp $fpath)
autoload -U zfinit
zfinit
export EMAIL_ADDR=for23@mail.ru

# Set prompts
PROMPT="%n@%m %3~ %(!.#.$) "    # default prompt

# Some environment variables
export HISTFILE=${HOME}/.bash_history
export HISTSIZE=10000
export SAVEHIST=10000
export USER=$USERNAME
export HOSTNAME=$HOST
#export GL_LIB=~/.ghostscript
export PATH=~/bin:/usr/local/bin:$PATH




bindkey -v             # vi key bindings

# Get keys working
bindkey "^[[2~" yank
bindkey "^_" yank
bindkey "^[[3~" delete-char
bindkey "^[[1~" beginning-of-line
bindkey "^[[4~" end-of-line
bindkey "^[[5~" up-line-or-history
bindkey "^[[6~" down-line-or-history

# Color completion.
export ZLS_COLORS=$LS_COLORS
zmodload -ui complist

# Completion functions
_compdir=/usr/share/zsh/$ZSH_VERSION/functions/Core
[[ -z $fpath[(r)$_compdir] ]] && fpath=($fpath $_compdir)
autoload -U compinit
compinit

 compctl -g '*(-/)' cd pushd
 compctl -g '*(/)' rmdir dircmp
 compctl -j -P % -x 's[-] p[1]' -k signals -- kill
 compctl -j -P % fg bg wait jobs disown
 compctl -A shift
 compctl -caF type whence which
 compctl -F unfunction
 compctl -a unalias
 compctl -v unset typeset declare vared readonly export integer
 compctl -e disable
 compctl -d enable


for i in /etc/profile.d/*.sh
 do
   if [[ -x "$i" ]]; then
     source $i
   fi
 done

## General alias
#  alias -g L="|less"
#  alias -g H="|head"
#  alias -g T="|tail"
#  alias -g G="|grep"
#  alias -g N="&>/dev/null&"
#  alias -g O="2>&1"

## Bindkey you may think it's usefull 
#  bindkey ' ' magic-space  # also do history expansino on space
  bindkey -s "^xs" '\C-e"\C-asu -c "'
  bindkey -s "^xd" "$(date '+-%d_%b')"
  bindkey -s "^xf" "$(date '+-%D'|sed 's|/||g')"
  bindkey -s "^xp" "\$(pwd\)/"
  bindkey -s "^xw" "\C-a \$(which \C-e\)\C-a"
set -B

autoload -U promptinit
promptinit

prompt mnw

if [[ "$TERM" == "xterm" ]] then
    bindkey    "^[2;5~"		yank
    bindkey    "^_"		backward-delete-char
    bindkey    "^[3;5~"		delete-char
    bindkey    "^[5;5~"		up-history
    bindkey    "^[6;5~"		down-history
fi
bindkey    "^[[C"		forward-char
bindkey    "^[[D"		backward-char
bindkey    "^[[A"		up-history
bindkey    "^[[B"		down-history

# Avoid network problems
#   ... \177 (ASCII-DEL) and \010 (ASCII-BS)
#       do `backward-delete-char'
# Note: `delete-char' is maped to \033[3~
#       Therefore xterm's responce on pressing
#       key Delete or KP-Delete should be
#       \033[3~ ... NOT \177
bindkey    "^?"		backward-delete-char
bindkey    "^H"		backward-delete-char

# Home and End
if [[ "$TERM" == "xterm" ]] then
    # Normal keypad and cursor of xterm
    bindkey    "^[[1~"	history-search-backward
    bindkey    "^[[4~"	set-mark-command
    bindkey    "^[[H"	beginning-of-line
    bindkey    "^[[F"	end-of-line
    # Home and End of application keypad and cursor of xterm
    bindkey    "^[OH"	beginning-of-line
    bindkey    "^[OF"	end-of-line
    bindkey    "^[O5H"	beginning-of-line
    bindkey    "^[O5F"	end-of-line
else
if [[ "$TERM" == "kvt" ]] then
    bindkey    "^[[1~"	history-search-backward
    bindkey    "^[[4~"	set-mark-command
    bindkey    "^[OH"	beginning-of-line
    bindkey    "^[OF"	end-of-line
else
    # TERM=linux or console
    bindkey    "^[[1~"	beginning-of-line
    bindkey    "^[[4~"	end-of-line
fi
fi

# Application keypad and cursor of xterm
if [[ "$TERM" == "xterm" ]] then
    bindkey    "^[OD"	backward-char
    bindkey    "^[OC"	forward-char
    bindkey    "^[OA"	up-history
    bindkey    "^[OB"	down-history
    # DEC keyboard KP_F1 - KP_F4
    bindkey -s "^[OP"	"^["
    bindkey    "^[OQ"	undo
    bindkey    "^[OR"	undefined-key  
    bindkey    "^[OS"	kill-line
fi
if [[ "$TERM" == "gnome" ]] then
    # or gnome terminal F1 - F4
    bindkey -s "^[OP"	"^["
    bindkey    "^[OQ"	undo
    bindkey    "^[OR"	undefined-key  
    bindkey    "^[OS"	kill-line
fi
# Function keys F1 - F12
if [[ "$TERM" == "linux" ]] then
    # On console the first five function keys
    bindkey    "^[[[A"	undefined-key
    bindkey    "^[[[B"	undefined-key
    bindkey    "^[[[C"	undefined-key
    bindkey    "^[[[D"	undefined-key
    bindkey    "^[[[E"	undefined-key
else
    # The first five standard function keys
    bindkey    "^[[11~"	undefined-key
    bindkey    "^[[12~"	undefined-key
    bindkey    "^[[13~"	undefined-key
    bindkey    "^[[14~"	undefined-key
    bindkey    "^[[15~"	undefined-key
fi
bindkey    "^[[17~"		undefined-key
bindkey    "^[[18~"		undefined-key
bindkey    "^[[19~"		undefined-key
bindkey    "^[[20~"		undefined-key
bindkey    "^[[21~"		undefined-key
# Note: F11, F12 are identical with Shift_F1 and Shift_F2
bindkey    "^[[23~"		undefined-key
bindkey    "^[[24~"		undefined-key

# Shift Function keys F1  - F12
#      identical with F11 - F22
#
# bindkey   "^[[23~"	undefined-key
# bindkey   "^[[24~"	undefined-key
bindkey    "^[[25~"		undefined-key
bindkey    "^[[26~"		undefined-key
# DEC keyboard: F15=^[[28~ is Help
bindkey    "^[[28~"		undefined-key
# DEC keyboard: F16=^[[29~ is Menu
bindkey    "^[[29~"		undefined-key
bindkey    "^[[31~"		undefined-key
bindkey    "^[[32~"		undefined-key
bindkey    "^[[33~"		undefined-key
bindkey    "^[[34~"		undefined-key
if [[ "$TERM" == "xterm" ]] then
    # Not common
    bindkey    "^[[35~"	undefined-key
    bindkey    "^[[36~"	undefined-key
fi

if [[ "$TERM" == "xterm" ]] then
    # Application keypad and cursor of xterm
    # with NumLock ON
    #
    # Operators
    bindkey -s "^[Oo"	"/"
    bindkey -s "^[Oj"	"*"
    bindkey -s "^[Om"	"-"
    bindkey -s "^[Ok"	"+"
    bindkey -s "^[Ol"	","
    bindkey -s "^[OM"	"\n"
    bindkey -s "^[On"	"."
    # Numbers
    bindkey -s "^[Op"	"0"
    bindkey -s "^[Oq"	"1"
    bindkey -s "^[Or"	"2"
    bindkey -s "^[Os"	"3"
    bindkey -s "^[Ot"	"4"
    bindkey -s "^[Ou"	"5"
    bindkey -s "^[Ov"	"6"
    bindkey -s "^[Ow"	"7"
    bindkey -s "^[Ox"	"8"
    bindkey -s "^[Oy"	"9"
fi

Harliff ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.