You are not logged in.

#1 2010-09-13 17:47:12

wolfspaw
Member
Registered: 2010-08-28
Posts: 15

ZSH, ZSH config, and Zsh prompt? (xMonad)

Hi Archers,

Even as a complete newbie i come to love ZSH. But i have some troubles.
(all my configs are in ~/.zshenv , because its something i know its always
read)
----------------------------------------------------------------------------------------------------------
Questions:

1) I add somethings to the PATH in my ~/.zshenv .  In a login shell
the PATH seems to be overridden, but all the other configs are loaded.
In an interactive shell the changes i did to the path stays. 

That behaviour confuses me...
I don't have a /etc/zsh, ~/.zshrc ~/.zlogin .
And the load order would be : ~/.zshenv -> /etc/profile
Im guessing something in /etc/profile overriddes my path but
why the path is not overridden also in the interactive shell?
-------------------------------------------------------------------------------------------------------

2) How can i write an alias like:  alias vimrc ='vim /etc/vimrc'  (this one does not work)?
and How can i write an alias with the parameters "inside" it, like:
alias volume='amixer -- sset Master playback X%' where X is what i type after the alias?

------------------------------------------------------------------------------------------------------
3) Im using xMonad with a premade configuration by Arosatto, and it has a great
thing where i press modKey + p and a shellPrompt appears(so i can issue commands).
Problem is... It uses /bin/sh, and i want ZSH (where i have all the great global aliases and exensions).
I though about replacing the sh file for a zsh one, but that probably will break my system.
Searching in xMonad and google i could'nt find a way to make it use ZSH.
Anyone Knows a way? (and if yes, how?)

Offline

#2 2010-09-13 17:56:41

katafrakt
Member
From: Kraków
Registered: 2010-06-08
Posts: 22

Re: ZSH, ZSH config, and Zsh prompt? (xMonad)

Ad2. for me "alias ls='ls --color=auto'" works as suppossed. Maybe that's because you use .zshenv? Citing http://zsh.sourceforge.net/Intro/intro_3.html :

`.zshenv' should not contain commands that produce output or assume the shell is attached to a tty.

And somewhere else it was said "do not use .zshenv at all!" wink

EDIT: and in my /etc/profile I have:

# Set our default path
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export PATH

So yes, maybe something is indeed overriding wink

Last edited by katafrakt (2010-09-13 18:00:02)

Offline

#3 2010-09-13 18:10:13

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: ZSH, ZSH config, and Zsh prompt? (xMonad)

Re 3) Make your own script. Use dmenu for the prompt.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB