| View previous topic :: View next topic |
| Author |
Message |
geniux Veteran


Joined: 19 Feb 2004 Posts: 1400 Location: /home
|
Posted: Sat Sep 04, 2004 12:41 am Post subject: |
|
|
| 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  |
Oops, sorry, I solved it myself. I just did a real reboot and now it's just how I want it  _________________ 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 |
|
 |
KozmoNaut Apprentice


Joined: 09 Dec 2002 Posts: 168 Location: Denmark
|
Posted: Mon Nov 01, 2004 9:20 pm Post subject: |
|
|
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 |
|
 |
babilen n00b

Joined: 02 Nov 2004 Posts: 1 Location: Germany
|
Posted: Tue Nov 02, 2004 10:36 pm Post subject: |
|
|
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
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 |
|
 |
petrjanda Veteran


Joined: 05 Sep 2003 Posts: 1557 Location: Brno, Czech Republic
|
Posted: Wed Nov 03, 2004 1:31 am Post subject: |
|
|
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 |
|
 |
joeljkp Guru

Joined: 06 Mar 2004 Posts: 316 Location: Starkville, MS, USA
|
Posted: Wed Nov 03, 2004 2:18 am Post subject: |
|
|
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 |
|
 |
slarti` Retired Dev


Joined: 20 Sep 2003 Posts: 376 Location: UK
|
Posted: Wed Nov 03, 2004 6:30 pm Post subject: |
|
|
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 |
|
 |
oberyno Guru

Joined: 15 Feb 2004 Posts: 467 Location: /bin/zsh
|
Posted: Sat Nov 06, 2004 9:17 am Post subject: |
|
|
| 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 |
|
 |
slarti` Retired Dev


Joined: 20 Sep 2003 Posts: 376 Location: UK
|
|
| Back to top |
|
 |
justanothergentoofanatic Guru

Joined: 29 Feb 2004 Posts: 337
|
Posted: Sat Nov 13, 2004 4:20 am Post subject: |
|
|
bah humbug.
If bash was good enough for my mama, then it's good enough for me.
-Mike |
|
| Back to top |
|
 |
slarti` Retired Dev


Joined: 20 Sep 2003 Posts: 376 Location: UK
|
Posted: Sat Nov 13, 2004 10:36 am Post subject: |
|
|
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 |
|
 |
Wi1d Apprentice


Joined: 15 Mar 2004 Posts: 282 Location: USA, Iowa
|
Posted: Sat Nov 13, 2004 2:05 pm Post subject: |
|
|
| 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 |
|
 |
slarti` Retired Dev


Joined: 20 Sep 2003 Posts: 376 Location: UK
|
Posted: Sat Nov 13, 2004 3:20 pm Post subject: |
|
|
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 |
|
 |
oberyno Guru

Joined: 15 Feb 2004 Posts: 467 Location: /bin/zsh
|
Posted: Sat Nov 13, 2004 4:20 pm Post subject: |
|
|
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 |
|
 |
Wi1d Apprentice


Joined: 15 Mar 2004 Posts: 282 Location: USA, Iowa
|
Posted: Sat Nov 13, 2004 7:54 pm Post subject: |
|
|
| Thanks for both responces. It works again. |
|
| Back to top |
|
 |
justanothergentoofanatic Guru

Joined: 29 Feb 2004 Posts: 337
|
Posted: Sun Nov 14, 2004 6:00 am Post subject: |
|
|
| 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 |
|
 |
gentoo_lan l33t


Joined: 08 Sep 2004 Posts: 887 Location: RAF Lakenheath, England
|
Posted: Sun Nov 14, 2004 8:47 am Post subject: |
|
|
| 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 |
|
 |
MrNugget Tux's lil' helper

Joined: 15 Nov 2003 Posts: 144 Location: Germany
|
Posted: Sun Nov 14, 2004 2:50 pm Post subject: |
|
|
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 |
|
 |
oberyno Guru

Joined: 15 Feb 2004 Posts: 467 Location: /bin/zsh
|
Posted: Tue Nov 16, 2004 10:20 pm Post subject: |
|
|
| 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 |
|
 |
martinbishop n00b


Joined: 16 Dec 2003 Posts: 66
|
Posted: Sun Nov 21, 2004 9:34 pm Post subject: |
|
|
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 |
|
 |
pjj Apprentice


Joined: 30 Apr 2004 Posts: 165 Location: The Netherlands
|
|
| Back to top |
|
 |
Useful Idiot Guru


Joined: 30 Aug 2002 Posts: 329 Location: Finland
|
Posted: Mon Nov 22, 2004 6:40 pm Post subject: |
|
|
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 |
|
 |
slarti` Retired Dev


Joined: 20 Sep 2003 Posts: 376 Location: UK
|
Posted: Mon Nov 22, 2004 7:48 pm Post subject: |
|
|
| 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 |
|
 |
rawoul n00b


Joined: 27 Dec 2003 Posts: 65
|
Posted: Mon Nov 22, 2004 7:49 pm Post subject: |
|
|
or you can do
| Code: | autoload prompinit
promptinit
prompt_gentoo_setup |
|
|
| Back to top |
|
 |
pjj Apprentice


Joined: 30 Apr 2004 Posts: 165 Location: The Netherlands
|
Posted: Mon Nov 22, 2004 7:52 pm Post subject: |
|
|
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  |
|
| Back to top |
|
 |
racoontje Veteran

Joined: 19 Jul 2004 Posts: 1290
|
Posted: Mon Nov 22, 2004 8:16 pm Post subject: |
|
|
| Mabye we should change the standard shell from bash to zsh? A lot of people prefer it. |
|
| Back to top |
|
 |
|