Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ZSH users (lovers?) thread
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6 ... 11, 12, 13  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
geniux
Veteran
Veteran


Joined: 19 Feb 2004
Posts: 1400
Location: /home

PostPosted: Sat Sep 04, 2004 12:41 am    Post subject: Reply with quote

geniux wrote:
I've seen that alot of you got the % after the username, but I've still got the $. Anyone know how to change this, would be nice to show that I have zsh :D

Oops, sorry, I solved it myself. I just did a real reboot and now it's just how I want it :D
_________________
AMD Athlon64 X2 4200+ AM2
MSI K9N SLI Platinum, Enermax Liberty 500W
1GB RAM Crucial DDR2 667MHz, MSI nVidia 7600GS 256MB
400GB + 250GB Samsung SATAII HDD
Gentoo - BeyondSources 2.6.19-20
Back to top
View user's profile Send private message
KozmoNaut
Apprentice
Apprentice


Joined: 09 Dec 2002
Posts: 168
Location: Denmark

PostPosted: Mon Nov 01, 2004 9:20 pm    Post subject: Reply with quote

Now that I've begun using Konsole instead of plain ol' Xterm, shift+tab is broken again for autocompletion. I can't even ctrl+v to see the keycode :(
_________________
War. War never changes.
Back to top
View user's profile Send private message
babilen
n00b
n00b


Joined: 02 Nov 2004
Posts: 1
Location: Germany

PostPosted: Tue Nov 02, 2004 10:36 pm    Post subject: Reply with quote

Hi All,

i used zsh for quite a long time now, and have a highly customised, though well documented .zshrc which is inspired by a lot others i found on the net.

You can find it here. Hope some of you find it useful... I marked all the lines you should edit with "#EDIT !!!"

I had a cool feature enabled some months ago in zsh command history cycling with the arrow keys but deleted it unintentianlly.... when i entered something like
Code:
ls <arrow-key-up>

zsh just cycled through all the commands in my history which started with ls.... Anybody knows how to re-enable it???


---
babilen
Back to top
View user's profile Send private message
petrjanda
Veteran
Veteran


Joined: 05 Sep 2003
Posts: 1557
Location: Brno, Czech Republic

PostPosted: Wed Nov 03, 2004 1:31 am    Post subject: Reply with quote

The SystemRescue CD uses zsh as the default shell. One function that I noticed is that if I mistype a command for example "grpe" it will ask me to change it to "grep". How do i go about setting this up?
_________________
There is, a not-born, a not-become, a not-made, a not-compounded. If that unborn, not-become, not-made, not-compounded were not, there would be no escape from this here that is born, become, made and compounded. - Gautama Siddharta
Back to top
View user's profile Send private message
joeljkp
Guru
Guru


Joined: 06 Mar 2004
Posts: 316
Location: Starkville, MS, USA

PostPosted: Wed Nov 03, 2004 2:18 am    Post subject: Reply with quote

I've heard rumors that zsh isn't POSIX compliant. Is this true? Does it cause problems?
_________________
Catch me on Jabber: joeljkp@jabber.org
Back to top
View user's profile Send private message
slarti`
Retired Dev
Retired Dev


Joined: 20 Sep 2003
Posts: 376
Location: UK

PostPosted: Wed Nov 03, 2004 6:30 pm    Post subject: Reply with quote

ZSH is POSIX 1003.2 compliant, as well as fully bourne-compatible.
_________________
Gentoo/AMD64, shell-tools, net-mail, vim, recruiters
IRC: slarti @ irc.freenode.net
Devspace
Back to top
View user's profile Send private message
oberyno
Guru
Guru


Joined: 15 Feb 2004
Posts: 467
Location: /bin/zsh

PostPosted: Sat Nov 06, 2004 9:17 am    Post subject: Reply with quote

KozmoNaut wrote:
Now that I've begun using Konsole instead of plain ol' Xterm, shift+tab is broken again for autocompletion. I can't even ctrl+v to see the keycode :(
I had a similar problem with unicode-rxvt. Adding
Code:
+ I Test (Init) Exec xmodmap -e 'keysym Tab = Tab'
to my .fvwm2rc allows shift + tab to work for me. YMMV.

babilen wrote:
I had a cool feature enabled some months ago in zsh command history cycling with the arrow keys but deleted it unintentianlly.... when i entered something like
Code:
ls <arrow-key-up>

zsh just cycled through all the commands in my history which started with ls.... Anybody knows how to re-enable it???
This should do the trick:
Code:
bindkey "^[[A"  history-search-backward
bindkey "^[[B"  history-search-forward
Personally, I prefer having PgUp and PgDn scroll through specific commands. Here's the bindings for that:
Code:
bindkey "\e[5~" history-search-backward
bindkey "\e[6~" history-search-forward


petrjanda wrote:
The SystemRescue CD uses zsh as the default shell. One function that I noticed is that if I mistype a command for example "grpe" it will ask me to change it to "grep". How do i go about setting this up?
It would be useful if you had the .zshrc from the cd if you want exactly the same functionality. For example, the following allows one error per word and will not add possible completions that have extra characters:
Code:
zstyle ':completion:::::' completer _complete _correct
zstyle ':completion:*:correct:::' max-errors 1
With that, grpe is corrected to grep with <tab> on my computer.
Alternatively, _approximate could be used.
Code:
zstyle ':completion:::::' completer _complete _approximate
zstyle -e ':completion:*:approximate:::' max-errors \
    'reply=( $(( ($#PREFIX+$#SUFFIX)/4 )) numeric )'
which would produce something like this after a <tab>:
Code:
------------------------------------->>   corrections                         
grep     grep-changelog     grep-changelog-22.0.0     grepseti   
------------------------------------->>   original                             
grpe
Also the max-errors line allows 1 error for every 4 characters typed.
Back to top
View user's profile Send private message
slarti`
Retired Dev
Retired Dev


Joined: 20 Sep 2003
Posts: 376
Location: UK

PostPosted: Fri Nov 12, 2004 11:45 pm    Post subject: Reply with quote

Well, the Z Shell book has just been released:

http://www.amazon.com/exec/obidos/tg/detail/-/1590593766/qid=1100286157/sr=1-1/ref=sr_1_1/102-3624532-0112961?v=glance&s=books

If you're interested in really mastering this shell (and believe me, there's a hell of a lot to master) it's a good buy. One for the Christmas list? :)
_________________
Gentoo/AMD64, shell-tools, net-mail, vim, recruiters
IRC: slarti @ irc.freenode.net
Devspace
Back to top
View user's profile Send private message
justanothergentoofanatic
Guru
Guru


Joined: 29 Feb 2004
Posts: 337

PostPosted: Sat Nov 13, 2004 4:20 am    Post subject: Reply with quote

bah humbug.

If bash was good enough for my mama, then it's good enough for me.

-Mike
Back to top
View user's profile Send private message
slarti`
Retired Dev
Retired Dev


Joined: 20 Sep 2003
Posts: 376
Location: UK

PostPosted: Sat Nov 13, 2004 10:36 am    Post subject: Reply with quote

If a Fiat Punto was good enough for your mother, would you refuse a Porsche?
_________________
Gentoo/AMD64, shell-tools, net-mail, vim, recruiters
IRC: slarti @ irc.freenode.net
Devspace
Back to top
View user's profile Send private message
Wi1d
Apprentice
Apprentice


Joined: 15 Mar 2004
Posts: 282
Location: USA, Iowa

PostPosted: Sat Nov 13, 2004 2:05 pm    Post subject: Reply with quote

Is it just me or has anyone else noticed that auto completion has stopped working for "emerge''. It stopped working for me like maybe a week ago but everything else seems fine. I've checked out '*/functions/Completion' thinking that I might find a hint to what the problem might be but found nothing. Suggestions anyone?
Back to top
View user's profile Send private message
slarti`
Retired Dev
Retired Dev


Joined: 20 Sep 2003
Posts: 376
Location: UK

PostPosted: Sat Nov 13, 2004 3:20 pm    Post subject: Reply with quote

It stopped working for me with zsh-4.2.1-r1.

You need to emerge app-shells/zsh-completion.
_________________
Gentoo/AMD64, shell-tools, net-mail, vim, recruiters
IRC: slarti @ irc.freenode.net
Devspace
Back to top
View user's profile Send private message
oberyno
Guru
Guru


Joined: 15 Feb 2004
Posts: 467
Location: /bin/zsh

PostPosted: Sat Nov 13, 2004 4:20 pm    Post subject: Reply with quote

If anyone's interested, I made a somewhat large patch to the latest emerge completion. patch
Code:
cd /usr/share/zsh/site-functions
cat /path/to/_portage_2004-11-12.patch | patch

It uses --argument for everything, so don't expect emerge sync<tab> to complete anything. The advantage is that arguments can be completed in whatever order. emerge --ask -d --unmerge<tab> will complete only installed packages. Pretty much every action that can accept arguments now has arguments to complete(--depclean, --search, --help,...). All the new portage 2.0.51 options are in as well.

Other than that, it's mostly small fixes/tweaks. Overlay support is everywhere. Packages and profiles(world system) no longer can be completed at the same time. I removed the ebuild version cache I put in earlier in favor of matching against what's already been typed. So emerge \=<tab> only completes categories, but add a letter and it'll complete all packages that starts with that letter.

Anyway, if no one has any problems with it, I'll send it to bugzilla in several days.
Edit: bug #71532


Last edited by oberyno on Wed Nov 17, 2004 4:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
Wi1d
Apprentice
Apprentice


Joined: 15 Mar 2004
Posts: 282
Location: USA, Iowa

PostPosted: Sat Nov 13, 2004 7:54 pm    Post subject: Reply with quote

Thanks for both responces. It works again.
Back to top
View user's profile Send private message
justanothergentoofanatic
Guru
Guru


Joined: 29 Feb 2004
Posts: 337

PostPosted: Sun Nov 14, 2004 6:00 am    Post subject: Reply with quote

slarti` wrote:
If a Fiat Punto was good enough for your mother, would you refuse a Porsche?


Natural leather upholstery chafes at pantyhose. Its tendancy to scald unprotected flesh is incompatible with many skirts and dresses.

QED.

-Mike
Back to top
View user's profile Send private message
gentoo_lan
l33t
l33t


Joined: 08 Sep 2004
Posts: 887
Location: RAF Lakenheath, England

PostPosted: Sun Nov 14, 2004 8:47 am    Post subject: Reply with quote

Quote:
If bash was good enough for my mama, then it's good enough for me.


Your mama hasn't tried Zsh. She would be quite impressed I think.
Back to top
View user's profile Send private message
MrNugget
Tux's lil' helper
Tux's lil' helper


Joined: 15 Nov 2003
Posts: 144
Location: Germany

PostPosted: Sun Nov 14, 2004 2:50 pm    Post subject: Reply with quote

Hello ZSH-lovers,

i want to try out ZSH (i'm using it on a server, but never really got into it),
so i downloaded babilen's .zshrc and now i'm using it.
But the dircolors are not working and i don't know any really cool
features of the ZSH. So maybe you can show me some tricks&tipps,
or things i must have seen, hehe. And is there a site which teaches how
to use the advantages of the ZSH?

Regards,
MrNugget
Back to top
View user's profile Send private message
oberyno
Guru
Guru


Joined: 15 Feb 2004
Posts: 467
Location: /bin/zsh

PostPosted: Tue Nov 16, 2004 10:20 pm    Post subject: Reply with quote

MrNugget wrote:
Hello ZSH-lovers,

i want to try out ZSH (i'm using it on a server, but never really got into it),
so i downloaded babilen's .zshrc and now i'm using it.
But the dircolors are not working and i don't know any really cool
features of the ZSH. So maybe you can show me some tricks&tipps,
or things i must have seen, hehe. And is there a site which teaches how
to use the advantages of the ZSH?

Regards,
MrNugget
You might want to try http://www.michael-prokop.at/computer/tools_zsh_en.html. Pretty much everything zsh related can be found from that site.

About the dircolors issue, you need to comment setopt NO_aliases in babilen's zshrc. That should make ls behave.
Back to top
View user's profile Send private message
martinbishop
n00b
n00b


Joined: 16 Dec 2003
Posts: 66

PostPosted: Sun Nov 21, 2004 9:34 pm    Post subject: Reply with quote

Has that "vim mode" bug been fixed? or whatever the problem was that made it replace text and get all screwed up
_________________
"I'm too busy doing nothing to care."
Back to top
View user's profile Send private message
pjj
Apprentice
Apprentice


Joined: 30 Apr 2004
Posts: 165
Location: The Netherlands

PostPosted: Mon Nov 22, 2004 5:19 pm    Post subject: Reply with quote

My shell looks different when I am in X how do I change this? (I use the gentoo promt theme). The config I use is the one babilen posted.

It now looks like this : http://img113.exs.cx/my.php?loc=img113&image=promt.png
Back to top
View user's profile Send private message
Useful Idiot
Guru
Guru


Joined: 30 Aug 2002
Posts: 329
Location: Finland

PostPosted: Mon Nov 22, 2004 6:40 pm    Post subject: Reply with quote

You can get a Gentooish(with % instead of $) prompt by putting this in your /etc/zsh/zshenv*:
Code:
export red=$'%{\e[1;31m%}'
export green=$'%{\e[1;32m%}'
export blue=$'%{\e[1;34m%}'
export default=$'%{\e[0m%}'

if [[ $- = *i* ]]
then
   if [[ "$USER" = root ]]
   then
      export PROMPT="${red}%m ${blue}%.%#${default} "
   else
      export PROMPT="${green}%n@%m ${blue}%.%#${default} "
   fi
fi


* or whatever you might be using as your config file
_________________
We are all in the gutter, but some of us are looking at the stars.
Join Einstein@Home GLUE-team
Back to top
View user's profile Send private message
slarti`
Retired Dev
Retired Dev


Joined: 20 Sep 2003
Posts: 376
Location: UK

PostPosted: Mon Nov 22, 2004 7:48 pm    Post subject: Reply with quote

martinbishop wrote:
Has that "vim mode" bug been fixed? or whatever the problem was that made it replace text and get all screwed up


it's not a bug, but if you want emacs-style keybindings, put bindkey -e in your zshrc.
_________________
Gentoo/AMD64, shell-tools, net-mail, vim, recruiters
IRC: slarti @ irc.freenode.net
Devspace
Back to top
View user's profile Send private message
rawoul
n00b
n00b


Joined: 27 Dec 2003
Posts: 65

PostPosted: Mon Nov 22, 2004 7:49 pm    Post subject: Reply with quote

or you can do
Code:
autoload prompinit
promptinit
prompt_gentoo_setup
Back to top
View user's profile Send private message
pjj
Apprentice
Apprentice


Joined: 30 Apr 2004
Posts: 165
Location: The Netherlands

PostPosted: Mon Nov 22, 2004 7:52 pm    Post subject: Reply with quote

Yeah I know but It works for me only when I am NOT in X. When in X it looks like what I have posted.

BTW : zsh rocks :D
Back to top
View user's profile Send private message
racoontje
Veteran
Veteran


Joined: 19 Jul 2004
Posts: 1290

PostPosted: Mon Nov 22, 2004 8:16 pm    Post subject: Reply with quote

Mabye we should change the standard shell from bash to zsh? A lot of people prefer it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6 ... 11, 12, 13  Next
Page 5 of 13

 
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