Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
zsh vs bash
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW
View previous topic :: View next topic  

zsh czy bash?
zsh
40%
 40%  [ 4 ]
bash
60%
 60%  [ 6 ]
Total Votes : 10

Author Message
soban_
l33t
l33t


Joined: 27 Aug 2008
Posts: 668
Location: /home/soban

PostPosted: Wed Jun 01, 2011 2:46 pm    Post subject: zsh vs bash Reply with quote

Osatnio zaliczylem przesiadke na zsh i w sumie jestem zadowolony. Jednak mam problem z przyciskami typu (Delete, End, Home) np jak wcisne Delete to zamiast kasowac to co jest przed kursyowa dostaje "~" - tzw tylde. Mi osobiscie bardzo podoba sie w zsh mozliwosc wchodzenia do folderow bez wpisywania np "cd", albo mozliwosc tabulatorem dobierania polecen czy uzupelniania sciezek. Oczywiscie po skonfigurowaniu go z http://www.gentoo.org/doc/pl/zsh.xml - ta dokumentacja. A czego Wy uzywacie i dlaczego? ( :
_________________
gg: 525600
Back to top
View user's profile Send private message
Garrappachc
Guru
Guru


Joined: 26 Dec 2008
Posts: 362
Location: Kraków

PostPosted: Wed Jun 01, 2011 4:12 pm    Post subject: Reply with quote

Kiedyś używałem zsh i był świetny, zwłaszcza prompty i możliwości ładnego sklejenia z emerge. Natomiast obecnie używam basha, bo lepiej się integruje z cięższymi powłokami, jak Konsole.

P.S. Jeśli chodzi o dopełnianie Tabem - przecież bash też to ma.
_________________
De profundis clamavi ad Te, Domine

emerge --info | virtual aviation
Back to top
View user's profile Send private message
soban_
l33t
l33t


Joined: 27 Aug 2008
Posts: 668
Location: /home/soban

PostPosted: Wed Jun 01, 2011 4:14 pm    Post subject: Reply with quote

Wiem, ale chodzilo mi o wyswietlanie wszystkich mozliwych opcji (bash tego nie ma, chyba? - np w danym folderze dopelnia nazwy plikow, przez ktore moge sie przelaczac wciskajac dalej tab) ( -: zastanawiam sie tez jak naprawic te przyciski Home, End, Delete...
_________________
gg: 525600
Back to top
View user's profile Send private message
bluebird89
n00b
n00b


Joined: 28 Aug 2004
Posts: 8

PostPosted: Wed Jun 01, 2011 6:28 pm    Post subject: Reply with quote

U mnie działa coś takiego w .zshrc:
Code:

bindkey -e

bindkey '\e[1~' beginning-of-line
bindkey '\e[4~' end-of-line
bindkey '\e[3~' delete-char

case $TERM in (xterm*)
        bindkey '\e[H' beginning-of-line
        bindkey '\e[F' end-of-line
esac

(prawdopodobnie ściągnięte z jakiegoś configa z neta)
Back to top
View user's profile Send private message
soban_
l33t
l33t


Joined: 27 Aug 2008
Posts: 668
Location: /home/soban

PostPosted: Wed Jun 01, 2011 6:36 pm    Post subject: Reply with quote

Dziekuje, pomoglo. A mozecie swoje cale konfigi lub fragmenty tutaj powstawiac? Moje np wygladaja tak w bashu:
Code:
[20:34:41 - 11-06-01] /home/soban % cat .bashrc
if [[ $- != *i* ]] ; then
        # Shell is non-interactive.  Be done now!
        return
fi


# Put your fun stuff here.
alias ls="ls --color"
alias shutdown='sudo shutdown'
alias teamviewer='/home/soban/teamviewer6/teamviewer'
alias reboot='sudo reboot'
alias logisim='java -jar /usr/share/logisim/lib/logisim.jar'
alias winbox='wine /home/soban/winbox.exe'
export LC_ALL=pl_PL.UTF-8
export LANG=pl_PL.UTF-8

#kolorowanie znaku zachety
#export PS1="[\t] \[\e[35;3m\]\u@\[\e[33;3m\]\H \[\e[34;2m\]\w \[\e[31;1m\]\\$ \[\e[0m\]"
#export PS1="\[\e[37;3m\][\e[34;2m\]\t\e[37;3m\]] \[\e[35;3m\]\u@\[\e[33;3m\]\H \[\e[34;2m\]\w \[\e[31;1m\]\\$ \[\e[0m\]"
#export PS1="\[\e[37;3m\][\e[34;2m\]\t\e[37;3m\]] \[\e[35;3m\]\u@\[\e[33;3m\]\H \[\e[34;2m\]\w \[\e[31;1m\]\\$ \[\e[0m\]"
#export PS1="[\t] \[\e[35;3m\]\u@\[\e[33;3m\]\H \[\e[34;2m\]\w \[\e[31;1m\]\\$ \ [\e[0m\]"

#export PS1="\[\e[35;1m\][\t][35;3m\] \[\e[35;3m\]\u@\[\e[33;3m\]\H \[\e[34;2m\] \W \[\e[31;1m\]\\$ \[\e[0m\]"

#kolorowanie man
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
#duze pliki
alias ducks='du -cks * | sort -rn | head -15|~/mb.py'
#rozmiar histori bez powtarzania
export TMOUT=3600

export HISTSIZE=5000
export HISTCONTROL=ignoredups
export HISTTIMEFORMAT="%h %d %H:%M:%S "
Zas zsh:
Code:
[20:36:34 - 11-06-01] /home/soban % cat .zshrc

#!/bin/zsh

# dopełnianie komend
autoload -U compinit
compinit
#poprawiony end, home, delete
bindkey -e

bindkey '\e[1~' beginning-of-line
bindkey '\e[4~' end-of-line
bindkey '\e[3~' delete-char

case $TERM in (xterm*)
          bindkey '\e[H' beginning-of-line
          bindkey '\e[F' end-of-line
esac

# poprawianie komend
alias ls="ls --color"
alias shutdown='sudo shutdown'
alias teamviewer='/home/soban/teamviewer6/teamviewer'
alias reboot='sudo reboot'
alias logisim='java -jar /usr/share/logisim/lib/logisim.jar'
alias winbox='wine /home/soban/winbox.exe'

zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
zstyle ':completion:*:warnings' format '%BSorry, no matches for: %d%b'
setopt correctall
export HISTSIZE=2000
export HISTFILE="$HOME/.history"
export SAVEHIST=$HISTSIZE
setopt hist_ignore_all_dups
setopt hist_ignore_space
setopt autocd


# znak zachęty
autoload -U promptinit
export PS1="[%* - %D] %d %% "
Moze macie jeszcze jakies ciekawe konfiguracje? ( :
_________________
gg: 525600


Last edited by soban_ on Wed Jun 01, 2011 10:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
SlashBeast
Retired Dev
Retired Dev


Joined: 23 May 2006
Posts: 2922

PostPosted: Wed Jun 01, 2011 8:06 pm    Post subject: Reply with quote

zsh wymiata jak tylko sie wie, jak wykorzystac jego bajery wzgledem basha.

interaktywny szel - zsh
skrypty - bash badz posix sh.

moj aktualny zshrc - http://paste.pocoo.org/show/JelPMotJArISEZzzwAdW/
Back to top
View user's profile Send private message
soban_
l33t
l33t


Joined: 27 Aug 2008
Posts: 668
Location: /home/soban

PostPosted: Thu Jun 02, 2011 8:10 pm    Post subject: Reply with quote

Dzieki @SlashBeast za konfig, na pewno sie przyda.
Garrappachc wrote:
Natomiast obecnie używam basha, bo lepiej się integruje z cięższymi powłokami, jak Konsole.
Jest na to jakies lekarstwo? Bo tez mam wrazenie ze w tty/konsole/yakuake on tak jakby sie "zawiesza" zanim sie uruchomi.
_________________
gg: 525600
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum