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 ... 7, 8, 9 ... 11, 12, 13  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
ag_x
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2004
Posts: 142
Location: Self Sarkarm.

PostPosted: Tue Nov 21, 2006 3:14 pm    Post subject: Reply with quote

benol wrote:
Hi!

I edited my /etc/zsh/zshrc file to load the complist module, but at the same time I wanted to make my own .zshrc universal and load the module from there, just to make sure it gets loaded (in case I switch to another computer). Now ZSH complains, that
Code:
zmodload:2: module zsh/complist already loaded.

How can I check if the module has already been loaded in my .zshrc?

I guess this should work.
[[ -z "$modules[zsh/complist]" ]] && zmodload zsh/complist
Back to top
View user's profile Send private message
davascript
l33t
l33t


Joined: 07 Apr 2004
Posts: 618
Location: Pennsylvania

PostPosted: Tue Nov 21, 2006 5:09 pm    Post subject: Reply with quote

I love this shell it makes life so much easier navigating around your directory structure. The tab completion def kicks major ass. This is an awesome thread so I had to bump it.
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2512
Location: Silver City, NM

PostPosted: Mon Apr 02, 2007 6:23 am    Post subject: Reply with quote

I already posted about this problem in the Paludis thread but got no responses (so far).

After emerging paludis-0.22.1 with the zsh-completion USE flag, it appears that some of my zsh completion is now broken. Specifically, tab completion for vim is broken. If I try to tab complete after vim, I get the following error:
Code:
$ vim /etc/pal<tab>
_arguments:340: _vim_files: function definition file not found

The function _vim_files appears to be defined in this file: /usr/share/zsh/4.3.2/functions/Completion/Unix/_vim which is part of the zsh package.

I've tried re-emerging both zsh and zsh-completion but this didn't solve the problem. It is possible the problem is unrelated to emerging paludis.
Back to top
View user's profile Send private message
Vojko
n00b
n00b


Joined: 11 Aug 2006
Posts: 27

PostPosted: Sat Apr 28, 2007 4:01 pm    Post subject: Reply with quote

hey, is it possible to make a key binding to go one tab selection back

for example you go

ls <tab>

prints

dir1
dir2
dir3

and when you do ls <tab><tab><tab><tab> it will print ls dir3 but i want dir2 so i would like to make shift+tab to go one selection back to print ls dir2
(like in command prompt in windows)
Back to top
View user's profile Send private message
bssteph
l33t
l33t


Joined: 26 Feb 2003
Posts: 652
Location: Wisconsin

PostPosted: Mon May 07, 2007 5:33 am    Post subject: Reply with quote

Nice thread, it converted me to zsh, looking like for good. Question. I get the following when logging in:

Code:
/etc/zsh/zprofile:34: no matches found: /etc/profile.d/*.sh


It's a fairly minimal box and there is indeed no *.sh in /etc/profile.d/

Since the message was annoying, I just made an empty dummy.sh in there and now zsh has nothing to complain about. This works fine, but is there a better way?
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2512
Location: Silver City, NM

PostPosted: Mon May 07, 2007 5:51 am    Post subject: Reply with quote

The code that fails was introduced at the bottom of this bug report. You might want to add to that bug report thread telling them of the error message you got (I can do it for you if you want).

The only *.sh files I have in /etc/profile.d/ are associated with Java configuration. Your solution of touching dummy.sh should be absolutely fine.
Back to top
View user's profile Send private message
bssteph
l33t
l33t


Joined: 26 Feb 2003
Posts: 652
Location: Wisconsin

PostPosted: Mon May 07, 2007 6:09 am    Post subject: Reply with quote

BitJam wrote:
The code that fails was introduced at the bottom of this bug report. You might want to add to that bug report thread telling them of the error message you got (I can do it for you if you want).

The only *.sh files I have in /etc/profile.d/ are associated with Java configuration. Your solution of touching dummy.sh should be absolutely fine.


Good catch, thanks. I suck at Bugzilla and didn't see that.

The bug's RESOLVED but I left a comment anyway.
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2512
Location: Silver City, NM

PostPosted: Mon May 07, 2007 7:05 am    Post subject: Reply with quote

I found the bug report by looking at the Changelog:
Code:
30 Apr 2007; Mamoru KOMACHI <usata@gentoo.org> files/zprofile,
  +zsh-4.3.4.ebuild:
  Version bumped. (bug #175302)
  Changed zprofile to source /etc/profile.d/*.sh. (bug #19924)
Back to top
View user's profile Send private message
_Gandalf_
n00b
n00b


Joined: 15 Mar 2007
Posts: 9

PostPosted: Tue Jun 05, 2007 9:31 pm    Post subject: Wrong RPROMPT place Reply with quote

Hi guys,

I'm using zsh for almost a year now, but ever since I move to Gentoo, RPROMPT is showing in the wrong place, I tried everything but I can't get it fixed, here's some info

Screenshot .zshrc .zsh/

I'm using phil's prompt...

In a terminal emulator (I use urxvt), it does show up correctly, but only in console, it's like the RPROMPT is couple of characters to the right, so it continues on the line which breaks all kind of auto-completion, it is very annoying everytime I'm on console I switch to bash or use another prompt because of this error :(

your help is appreciated :)

EDIT: http://nopaste.nasreddine.com/18ca877db3.html is an IRC conversation just to avoid duplicate discussion here and there


Last edited by _Gandalf_ on Tue Jun 05, 2007 10:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2512
Location: Silver City, NM

PostPosted: Tue Jun 05, 2007 10:19 pm    Post subject: Reply with quote

I have a similar problem in the vconsoles if I use zsh as my login shell. I don't have the problem in Konsole (which is the only other terminal program I use). My solution was to use Bash as my login shell and set zsh to be my login shell for Konsole. In the vconsoles I just launch zsh from inside of Bash and the problem with the prompt goes away. This is not a perfect solution but it was the best I could come up with.
Back to top
View user's profile Send private message
_Gandalf_
n00b
n00b


Joined: 15 Mar 2007
Posts: 9

PostPosted: Tue Jun 05, 2007 10:28 pm    Post subject: Reply with quote

BitJam wrote:
I have a similar problem in the vconsoles if I use zsh as my login shell. I don't have the problem in Konsole (which is the only other terminal program I use). My solution was to use Bash as my login shell and set zsh to be my login shell for Konsole. In the vconsoles I just launch zsh from inside of Bash and the problem with the prompt goes away. This is not a perfect solution but it was the best I could come up with.
It didn't work for me, running zsh from bash (bash as default shell) has the same effect :(
Back to top
View user's profile Send private message
_Gandalf_
n00b
n00b


Joined: 15 Mar 2007
Posts: 9

PostPosted: Tue Jun 05, 2007 10:47 pm    Post subject: Reply with quote

Code:

$ echo $TERM
linux
$ ssh issam
Last login: [....]
Couldnt get a file descriptor referring to the console
$ exit
$

Hmmm... :roll:
Back to top
View user's profile Send private message
Shadow Skill
Veteran
Veteran


Joined: 04 Dec 2004
Posts: 1023

PostPosted: Mon Jun 11, 2007 8:20 am    Post subject: Reply with quote

Does anyone know how I can set up zsh so that gnu screen is able to dynamically set the window title? The original post mentions this however the link to his file is dead. :cry:
_________________
Ware wa mutekinari.
Wa ga kage waza ni kanau mono nashi.
Wa ga ichigeki wa mutekinari.

"First there was nothing, so the lord gave us light. There was still nothing, but at least you could see it."
Back to top
View user's profile Send private message
bssteph
l33t
l33t


Joined: 26 Feb 2003
Posts: 652
Location: Wisconsin

PostPosted: Sat Jun 30, 2007 3:50 pm    Post subject: Reply with quote

Shadow Skill wrote:
Does anyone know how I can set up zsh so that gnu screen is able to dynamically set the window title? The original post mentions this however the link to his file is dead. :cry:


This is what I have:

Code:
# set the GNU screen title to the last executed command
# set the xterm title to the current working directory
case $TERM in
        screen*)
                preexec () {
                        local CMD=${1[(wr)^(*=*|sudo|-*)]}
                        echo -ne "\ek$CMD\e\\"
                }
                chpwd() { print -Pn "\e]0;%n@%m: %~\a" }
                print -Pn "\e]0;%n@%m: %~\a"
                ;;
        xterm*)
                chpwd() { print -Pn "\e]0;%n@%m: %~\a" }
                print -Pn "\e]0;%n@%m: %~\a"
                ;;
esac


Should do what you want. Note that I updated it a little bit just now, so I don't guarantee its correctness, but there you go.
Back to top
View user's profile Send private message
Shadow Skill
Veteran
Veteran


Joined: 04 Dec 2004
Posts: 1023

PostPosted: Sat Jun 30, 2007 7:52 pm    Post subject: Reply with quote

bssteph wrote:
Shadow Skill wrote:
Does anyone know how I can set up zsh so that gnu screen is able to dynamically set the window title? The original post mentions this however the link to his file is dead. :cry:


This is what I have:

Code:
# set the GNU screen title to the last executed command
# set the xterm title to the current working directory
case $TERM in
        screen*)
                preexec () {
                        local CMD=${1[(wr)^(*=*|sudo|-*)]}
                        echo -ne "\ek$CMD\e\\"
                }
                chpwd() { print -Pn "\e]0;%n@%m: %~\a" }
                print -Pn "\e]0;%n@%m: %~\a"
                ;;
        xterm*)
                chpwd() { print -Pn "\e]0;%n@%m: %~\a" }
                print -Pn "\e]0;%n@%m: %~\a"
                ;;
esac


Should do what you want. Note that I updated it a little bit just now, so I don't guarantee its correctness, but there you go.
It works thank you so much. Also thanks for the PM I probably never would have noticed were it not for that.. :)
_________________
Ware wa mutekinari.
Wa ga kage waza ni kanau mono nashi.
Wa ga ichigeki wa mutekinari.

"First there was nothing, so the lord gave us light. There was still nothing, but at least you could see it."
Back to top
View user's profile Send private message
kwalo
n00b
n00b


Joined: 21 Feb 2007
Posts: 20
Location: Poland

PostPosted: Wed Jan 30, 2008 12:35 am    Post subject: Reply with quote

add this to your .zshrc:
Code:
setopt autocd
alias ...='../..'
alias ....='../../..'
alias .....='../../../..'

With autocd you don't need to type cd to change directories. Just type in directory name. Aliases make it easier to jump few dirs up.

Another cool feature is extended globbing. For example type in:
Code:
ls /v/l/p/e<TAB>

It'll automatically expand to /var/log/portage/elog. Saves lots of typing and tab hitting.

//EDIT: The quotes are fine. Thanks BitJam


Last edited by kwalo on Wed Jan 30, 2008 8:33 pm; edited 2 times in total
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2512
Location: Silver City, NM

PostPosted: Wed Jan 30, 2008 7:37 pm    Post subject: Reply with quote

kwalo, you are missing an opening quote on the third alias line.
Back to top
View user's profile Send private message
doum
Tux's lil' helper
Tux's lil' helper


Joined: 05 May 2003
Posts: 85
Location: Nissa

PostPosted: Thu Mar 06, 2008 8:48 am    Post subject: Reply with quote

Hi,

I have a little problem.

I just install Gentoo, zsh, and zsh-completion.
Before that, i was on debian, and I installed a zsh configuration for completion, including the apt-get.

I thought that the package zsh-completion allowed the same thing to emerge. But nothing happens over

Do I forget something?

Thank you for your help
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Thu Mar 06, 2008 2:53 pm    Post subject: Reply with quote

I have the following in my .zshrc:
Code:
# ZSH completion >>>>>
#zmodload zsh/complist
autoload -U compinit promptinit
compinit
promptinit
prompt_gentoo_setup
prompt gentoo
Maybe this will help.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
champ
Tux's lil' helper
Tux's lil' helper


Joined: 25 Oct 2006
Posts: 97
Location: Thailand

PostPosted: Tue Apr 08, 2008 9:31 am    Post subject: Reply with quote

This thread has converted me also to zsh, and I love it.

However, aliases are not working, whether I set them in .zshrc or from the command line. zsh does not give an error, but trying the alias gives 'command not found'.

I am using the .zshrc from /usr/doc/zsh/StartupFiles/zshrc.
_________________
"Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety." - Benjamin Franklin

blog: johnsearth.blogspot.com
Back to top
View user's profile Send private message
kwalo
n00b
n00b


Joined: 21 Feb 2007
Posts: 20
Location: Poland

PostPosted: Wed Apr 09, 2008 1:24 pm    Post subject: Reply with quote

champ, it's strange that you get alias: command not found error. It's an shell built-in.
Can you give us the output of which alias? It should look like this:
Code:
$ which alias
alias: shell built-in command
Back to top
View user's profile Send private message
champ
Tux's lil' helper
Tux's lil' helper


Joined: 25 Oct 2006
Posts: 97
Location: Thailand

PostPosted: Thu Apr 10, 2008 7:39 am    Post subject: Reply with quote

Code:
which alias
alias: alaised to :


Quote:
champ, it's strange that you get alias: command not found error.

Actually, I do not get an alias: command not found. Instead I get (for example)
Code:
alias ll='ls -l'

ll tmp
ll: command not found

_________________
"Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety." - Benjamin Franklin

blog: johnsearth.blogspot.com
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Thu Apr 10, 2008 11:01 am    Post subject: Reply with quote

So you say you use the zshrc from /usr/share/doc/zsh-<$VERSION>/StartupFiles/ ? And you removed the line "return 0" as it is advised did you?

Greetz
swimmer ;-)
Back to top
View user's profile Send private message
kwalo
n00b
n00b


Joined: 21 Feb 2007
Posts: 20
Location: Poland

PostPosted: Fri Apr 11, 2008 12:43 pm    Post subject: Reply with quote

Why do you have alias aliased to : ?
Try 'unalias alias' and it should work fine.
Back to top
View user's profile Send private message
ocin
Guru
Guru


Joined: 01 Jan 2006
Posts: 500

PostPosted: Sun Apr 13, 2008 7:14 pm    Post subject: Reply with quote

my .zshrc
http://nico.codernet.org/pub/configs/zshrc
pretty self-explainable :)
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 ... 7, 8, 9 ... 11, 12, 13  Next
Page 8 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