Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

ZSH users (lovers?) thread

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
301 posts
  • Page 5 of 13
    • Jump to page:
  • Previous
  • 1
  • …
  • 3
  • 4
  • 5
  • 6
  • 7
  • …
  • 13
  • Next
Author
Message
geniux
Veteran
Veteran
User avatar
Posts: 1400
Joined: Thu Feb 19, 2004 6:43 am
Location: /home

  • Quote

Post by geniux » Sat Sep 04, 2004 12:41 am

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
Top
KozmoNaut
Apprentice
Apprentice
User avatar
Posts: 168
Joined: Mon Dec 09, 2002 4:06 pm
Location: Denmark

  • Quote

Post by KozmoNaut » Mon Nov 01, 2004 9:20 pm

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.
Top
babilen
n00b
n00b
Posts: 1
Joined: Tue Nov 02, 2004 9:50 pm
Location: Germany

  • Quote

Post by babilen » Tue Nov 02, 2004 10:36 pm

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: Select all

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
Top
petrjanda
Veteran
Veteran
User avatar
Posts: 1557
Joined: Fri Sep 05, 2003 10:04 pm
Location: Brno, Czech Republic
Contact:
Contact petrjanda
Website

  • Quote

Post by petrjanda » Wed Nov 03, 2004 1:31 am

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
Top
joeljkp
Guru
Guru
Posts: 316
Joined: Sat Mar 06, 2004 6:07 pm
Location: Starkville, MS, USA
Contact:
Contact joeljkp
Website

  • Quote

Post by joeljkp » Wed Nov 03, 2004 2:18 am

I've heard rumors that zsh isn't POSIX compliant. Is this true? Does it cause problems?
Catch me on Jabber: joeljkp@jabber.org
Top
slarti`
Retired Dev
Retired Dev
User avatar
Posts: 376
Joined: Sat Sep 20, 2003 3:04 pm
Location: UK
Contact:
Contact slarti`
Website

  • Quote

Post by slarti` » Wed Nov 03, 2004 6:30 pm

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
Top
oberyno
Guru
Guru
Posts: 467
Joined: Sun Feb 15, 2004 10:39 am
Location: /bin/zsh

  • Quote

Post by oberyno » Sat Nov 06, 2004 9:17 am

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: Select all

+ 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: Select all

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: Select all

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: Select all

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: Select all

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: Select all

------------------------------------->>   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.
Top
slarti`
Retired Dev
Retired Dev
User avatar
Posts: 376
Joined: Sat Sep 20, 2003 3:04 pm
Location: UK
Contact:
Contact slarti`
Website

  • Quote

Post by slarti` » Fri Nov 12, 2004 11:45 pm

Well, the Z Shell book has just been released:

http://www.amazon.com/exec/obidos/tg/de ... ce&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
Top
justanothergentoofanatic
Guru
Guru
Posts: 337
Joined: Sun Feb 29, 2004 2:14 am

  • Quote

Post by justanothergentoofanatic » Sat Nov 13, 2004 4:20 am

bah humbug.

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

-Mike
Top
slarti`
Retired Dev
Retired Dev
User avatar
Posts: 376
Joined: Sat Sep 20, 2003 3:04 pm
Location: UK
Contact:
Contact slarti`
Website

  • Quote

Post by slarti` » Sat Nov 13, 2004 10:36 am

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
Top
Wi1d
Apprentice
Apprentice
User avatar
Posts: 282
Joined: Mon Mar 15, 2004 3:46 pm
Location: USA, Iowa
Contact:
Contact Wi1d
Website

  • Quote

Post by Wi1d » Sat Nov 13, 2004 2:05 pm

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?
Top
slarti`
Retired Dev
Retired Dev
User avatar
Posts: 376
Joined: Sat Sep 20, 2003 3:04 pm
Location: UK
Contact:
Contact slarti`
Website

  • Quote

Post by slarti` » Sat Nov 13, 2004 3:20 pm

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
Top
oberyno
Guru
Guru
Posts: 467
Joined: Sun Feb 15, 2004 10:39 am
Location: /bin/zsh

  • Quote

Post by oberyno » Sat Nov 13, 2004 4:20 pm

If anyone's interested, I made a somewhat large patch to the latest emerge completion. patch

Code: Select all

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.
Top
Wi1d
Apprentice
Apprentice
User avatar
Posts: 282
Joined: Mon Mar 15, 2004 3:46 pm
Location: USA, Iowa
Contact:
Contact Wi1d
Website

  • Quote

Post by Wi1d » Sat Nov 13, 2004 7:54 pm

Thanks for both responces. It works again.
Top
justanothergentoofanatic
Guru
Guru
Posts: 337
Joined: Sun Feb 29, 2004 2:14 am

  • Quote

Post by justanothergentoofanatic » Sun Nov 14, 2004 6:00 am

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
Top
gentoo_lan
l33t
l33t
User avatar
Posts: 891
Joined: Wed Sep 08, 2004 12:45 am
Location: Charles Town, WV

  • Quote

Post by gentoo_lan » Sun Nov 14, 2004 8:47 am

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.
Top
MrNugget
Tux's lil' helper
Tux's lil' helper
Posts: 144
Joined: Sat Nov 15, 2003 12:40 pm
Location: Germany

  • Quote

Post by MrNugget » Sun Nov 14, 2004 2:50 pm

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
Top
oberyno
Guru
Guru
Posts: 467
Joined: Sun Feb 15, 2004 10:39 am
Location: /bin/zsh

  • Quote

Post by oberyno » Tue Nov 16, 2004 10:20 pm

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.
Top
martinbishop
n00b
n00b
User avatar
Posts: 66
Joined: Tue Dec 16, 2003 4:34 am

  • Quote

Post by martinbishop » Sun Nov 21, 2004 9:34 pm

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."
Top
pjj
Apprentice
Apprentice
User avatar
Posts: 165
Joined: Fri Apr 30, 2004 1:53 pm
Location: The Netherlands

  • Quote

Post by pjj » Mon Nov 22, 2004 5:19 pm

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
Top
Useful Idiot
Guru
Guru
User avatar
Posts: 329
Joined: Fri Aug 30, 2002 8:44 am
Location: Finland
Contact:
Contact Useful Idiot
Website

  • Quote

Post by Useful Idiot » Mon Nov 22, 2004 6:40 pm

You can get a Gentooish(with % instead of $) prompt by putting this in your /etc/zsh/zshenv*:

Code: Select all

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.
Top
slarti`
Retired Dev
Retired Dev
User avatar
Posts: 376
Joined: Sat Sep 20, 2003 3:04 pm
Location: UK
Contact:
Contact slarti`
Website

  • Quote

Post by slarti` » Mon Nov 22, 2004 7:48 pm

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
Top
rawoul
n00b
n00b
User avatar
Posts: 65
Joined: Sat Dec 27, 2003 8:07 pm

  • Quote

Post by rawoul » Mon Nov 22, 2004 7:49 pm

or you can do

Code: Select all

autoload prompinit
promptinit
prompt_gentoo_setup
Top
pjj
Apprentice
Apprentice
User avatar
Posts: 165
Joined: Fri Apr 30, 2004 1:53 pm
Location: The Netherlands

  • Quote

Post by pjj » Mon Nov 22, 2004 7:52 pm

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
Top
racoontje
Veteran
Veteran
Posts: 1290
Joined: Mon Jul 19, 2004 8:58 pm

  • Quote

Post by racoontje » Mon Nov 22, 2004 8:16 pm

Mabye we should change the standard shell from bash to zsh? A lot of people prefer it.
Top
Post Reply
  • Print view

301 posts
  • Page 5 of 13
    • Jump to page:
  • Previous
  • 1
  • …
  • 3
  • 4
  • 5
  • 6
  • 7
  • …
  • 13
  • Next

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic