Difference between revisions of "Talk:Zsh"

From ArchWiki
Jump to: navigation, search
(Remove inputrc conversion: Close old log info.)
(Missing files?: re)
 
(22 intermediate revisions by 10 users not shown)
Line 1: Line 1:
== <s> Eterm and zsh </s> ==
+
== Same directory in newly opened tab ==
My most recent Archlinux installation somehow has a conflict between Eterm and zsh, I found that some applications like mc, vim and mp3blaster do not pick up the arrow keys, even when using zkbd. They send an ABCD and some escape sequence garbage.<br>
 
By setting the TERM variable to xterm-color the problem was fixed. To not mess up the TERM variable in the console one could put this code in .zshrc:<br>
 
<nowiki>if [[ $TERM == "Eterm" ]]; then</nowiki><br>
 
<nowiki>TERM=xterm-color</nowiki><br>
 
<nowiki>fi</nowiki><br>
 
--Gilneas, 2006 Aug 11
 
  
== <s> /etc/zprofile and advanced .zshrc </s> ==
+
I had to append the following to my zshrc
  
I've added a /etc/zprofile section and moved some of the bits from the advanced .zshrc section to it. I'm going on what I've read of the docs, but if this is wrong, please change it. [[User:AlexW|AlexW]] 08:38, 10 December 2007 (EST)
+
{{hc|~/.zshrc|
 +
<truncated>
 +
. /etc/profile.d/vte.sh
 +
}}
  
== <s> eval `dircolors -z` generates an error </s>==
+
such that a newly opened tab opened in the previous working directory (using gnome-terminal). [[User:MrWhite|MrWhite]] ([[User talk:MrWhite|talk]]) 13:14, 5 November 2017 (UTC)
  
I have not been able to find a solution to this, so I have commented the Advanced .zshrc in the wiki here:
+
== Missing files? ==
http://wiki.archlinux.org/index.php/Zsh#Advanced_.zshrc
 
The -z does not appear to be a valid option for dircolors. Perhaps the original wiki author has a solution?
 
: Close. The section is already gone. -- [[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 01:14, 23 October 2012 (UTC)
 
  
== <s> Is the following accurate? </s> ==
+
I've installed (actually, re-installed)
 +
zsh 5.4.2-2
 +
zsh-completions 0.27.0-1
 +
zsh-doc 5.4.2-2
 +
zsh-lovers 0.9.1-1
 +
zsh-syntax-highlighting 0.6.0-1
 +
zshdb 0.08-4
 +
and run the {{ic|zsh-newuser-install}} script taking all the defaults.
  
The following was added recently:
+
* {{ic|/etc/zsh/zshenv}} does not exist
 +
* {{ic|/etc/zshenv}} does not exist
 +
* {{ic|$ZDOTDIR}} is undefined
  
"NOTE: It should be mentioned though infrequently, the virtual terminal that you couple with Zsh does effect its efficiency. It's known that Zsh cooperates not very well with urxvt (rxvt-unicode) with its daemon-client mode, shown in a dramatic reduction of speed of executing commands like "exit" or completions. So if you use urxvt, avoid using this mode and just run plain `urxvt`."
+
Is this operator error, or should this wiki page be updated?
  
I've being using zsh and urxvtd (deamon mode) for a long time and have never had an issue. Has anybody else experienced the above? Can the author please backup the statements above? If not, I think that note should be removed. What do others think? [[User:M l|M l]] 17:51, 24 November 2009 (EST)
+
[[User:Vgivanovic|vgivanovic]] ([[User talk:Vgivanovic|talk]]) 18:21, 31 January 2018 (UTC)
  
:Hi, I'm the one who added the comment. My situation is that with urxvtc, the `exit` command and completion becomes very, very slow. Actually I was just about to go back to bash because I didn't realize that this was a terminal problem -- but urxvtd crashed unexpectedly, I had to start urxvt without daemon (That's how I found out, with comparison of xterm). Of course, under the daemon mode, everything still works perfectly, just isn't as fast as it should be.
+
:{{ic|zsh-newuser-install}} only creates {{ic|${ZDOTDIR:-$HOME}/.zshrc}}, if you require any other files (for user or global config) you need to create them manually. Exception is {{ic|/etc/zsh/zprofile}} which is provided by {{Pkg|zsh}}. {{ic|$ZDOTDIR}} is not set by default so as the note in [[Zsh#Startup/Shutdown files]] says zsh fallbacks to {{ic|$HOME}}. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 08:37, 31 January 2018 (UTC)
:--[[User:B4283|B4283]] 19:07, 24 November 2009 (EST)
 
  
::wait, i don't know what happened. i was just trying to time the exact slowdown, but it got fast... sorry for the trouble. Although, I'm interested about what did you set the size of HISTSIZE and SAVEHIST -- that's the last change i've made in zshrc.
+
::What I was trying to say is that the [[Zsh]] page does not mention that {{ic|/etc/zsh/zshenv}} or {{ic|/etc/zshenv}} need to be installed manually. It just assumes that they exist and that they have the appropriate content. As a new zsh user, I found this confusing. (Where did the files go? Did I do something wrong? Is the installation broken? How do I fix it? Should I fix it?) So, I have two suggestions:
::--[[User:B4283|B4283]] 19:45, 24 November 2009 (EST)
+
::# Update the [[Zsh]] page to note that {{ic|/etc/zsh/zshenv}} is not automatically created by the {{Pkg|zsh}} package, but is where {{ic|root}} may add, at a later date, [[environment variables]] that are used by all zsh users.
 +
::# Since it appears that {{ic|zshenv}} has been renamed from {{ic|/etc/zshenv}} to {{ic|/etc/zsh/zshenv}}, note this change somewhere, perhaps in the second Note in [[Zsh#Startup/Shutdown files]].
  
::: I've experienced identical delays with large HISTSIZE and SAVEHIST.  Previously I used HISTSIZE=2500, SAVEHIST=15000.  Problem disappeared after setting it to HISTSIZE=2000, SAVEHIST=2000.  I suspect the problem is directly related to the size of the HISTFILE. --[[User:Chpln|Chpln]] 20:07, 24 November 2009 (EST)
+
::[[User:Vgivanovic|vgivanovic]] ([[User talk:Vgivanovic|talk]]) 19:14, 31 January 2018 (UTC)
  
:::: In my .zshrc I have 1000 for both HISTSIZE and SAVEHIST. But I do have HIST_IGNORE_ALL_DUPS. I will remove the note then. Thank you for quick response. [[User:M l|M l]] 20:54, 24 November 2009 (EST)
+
:::Nowhere in [[Zsh#Startup/Shutdown files]] does it say that any those files apart from {{ic|/etc/zsh/zprofile}} need to exist and nothing is broken by them not existing. The section just documents the order in which they are sourced. If you want to explicitly state, that to use them the files need to created manually, add a sentence explaining it below the file list.
 
+
:::Regarding the global file paths, the note at the bottom of [[Zsh#Startup/Shutdown files]] already mentions that the path differs from the man pages. Vote on {{Bug|48992}} and maybe someday the man pages will be fixed. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 10:11, 1 February 2018 (UTC)
::::: Thank you everyone for the useful information!  This problem has been bugging me for months. --[[User:May|May]] 10:09, 23 May 2010 (EDT)
 
:::::: Note is already removed. Close. -- [[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 01:16, 23 October 2012 (UTC)
 
 
 
== <s> Remove inputrc conversion </s> ==
 
 
 
The command doesn't work, so I'm removing it.
 

Latest revision as of 10:12, 1 February 2018

Same directory in newly opened tab

I had to append the following to my zshrc

~/.zshrc
<truncated>
. /etc/profile.d/vte.sh

such that a newly opened tab opened in the previous working directory (using gnome-terminal). MrWhite (talk) 13:14, 5 November 2017 (UTC)

Missing files?

I've installed (actually, re-installed)

zsh 5.4.2-2
zsh-completions 0.27.0-1
zsh-doc 5.4.2-2
zsh-lovers 0.9.1-1
zsh-syntax-highlighting 0.6.0-1
zshdb 0.08-4

and run the zsh-newuser-install script taking all the defaults.

  • /etc/zsh/zshenv does not exist
  • /etc/zshenv does not exist
  • $ZDOTDIR is undefined

Is this operator error, or should this wiki page be updated?

vgivanovic (talk) 18:21, 31 January 2018 (UTC)

zsh-newuser-install only creates ${ZDOTDIR:-$HOME}/.zshrc, if you require any other files (for user or global config) you need to create them manually. Exception is /etc/zsh/zprofile which is provided by zsh. $ZDOTDIR is not set by default so as the note in Zsh#Startup/Shutdown files says zsh fallbacks to $HOME. -- nl6720 (talk) 08:37, 31 January 2018 (UTC)
What I was trying to say is that the Zsh page does not mention that /etc/zsh/zshenv or /etc/zshenv need to be installed manually. It just assumes that they exist and that they have the appropriate content. As a new zsh user, I found this confusing. (Where did the files go? Did I do something wrong? Is the installation broken? How do I fix it? Should I fix it?) So, I have two suggestions:
  1. Update the Zsh page to note that /etc/zsh/zshenv is not automatically created by the zsh package, but is where root may add, at a later date, environment variables that are used by all zsh users.
  2. Since it appears that zshenv has been renamed from /etc/zshenv to /etc/zsh/zshenv, note this change somewhere, perhaps in the second Note in Zsh#Startup/Shutdown files.
vgivanovic (talk) 19:14, 31 January 2018 (UTC)
Nowhere in Zsh#Startup/Shutdown files does it say that any those files apart from /etc/zsh/zprofile need to exist and nothing is broken by them not existing. The section just documents the order in which they are sourced. If you want to explicitly state, that to use them the files need to created manually, add a sentence explaining it below the file list.
Regarding the global file paths, the note at the bottom of Zsh#Startup/Shutdown files already mentions that the path differs from the man pages. Vote on FS#48992 and maybe someday the man pages will be fixed. -- nl6720 (talk) 10:11, 1 February 2018 (UTC)