summaryrefslogtreecommitdiff
blob: 29f4b56192ca9f49d80581a86bbb1f076eb7c818 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2010-10-21 23:56+0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(guide:link):5
msgid "/doc/en/zsh.xml"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(guide:lang):5
msgid "en"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):6
msgid "zsh Configuration and Installation Guide"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(author:title):8 ../../gentoo/xml/htdocs/doc/en//zsh.xml(author:title):11
msgid "Author"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(mail:link):9
msgid "hekonsek@gmail.com"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(mail):9
msgid "Henryk Konsek"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(mail:link):12
msgid "morritt.andrew@gmail.com"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(mail):12
msgid "Andrew Morritt"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(author:title):14 ../../gentoo/xml/htdocs/doc/en//zsh.xml(author:title):17
msgid "Editor"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(mail:link):15
msgid "chriswhite@gentoo.org"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(mail):15
msgid "Chris White"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(mail:link):18
msgid "welp@gentoo.org"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(mail):18
msgid "Peter Weller"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(abstract):21
msgid "This guide shows how to install and configure zsh quickly. After reading this document you will be able use many zsh features such as advanced tab-completion, command correction and prompt management."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(version):31
msgid "2"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(date):32
msgid "2006-10-18"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):35
msgid "Installation"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):37
msgid "Installing zsh"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):40
msgid "To install <c>zsh</c> under Gentoo, we need to emerge the <c>app-shells/zsh</c> (zsh itself) and <c>app-shells/zsh-completion</c> (zsh completion scripts) packages."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):46
msgid "Emerging zsh"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):46
#, no-wrap
msgid "\n# <i>emerge zsh zsh-completion</i>\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):53
msgid "Entering zsh"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):56
msgid "When you start <c>zsh</c> for the first time, you get the following message. You can skip this menu as we will create an init file later in this guide."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):61
msgid "Skipping the initial config"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):61
#, no-wrap
msgid "\n$ <i>zsh</i>\nThis is the Z Shell configuration function for new users, zsh-newuser-install.\nYou are seeing this message because you have no zsh startup files\n(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory\n~).  This function can help you with a few settings that should\nmake your use of the shell easier.\n\nYou can:\n\n(q)  Quit and do nothing.  The function will be run again next time.\n\n(0)  Exit, creating the file ~/.zshrc containing just a comment.\n     That will prevent this function being run again.\n\n(1)  Continue to the main menu.\n\n--- Type one of the keys in parentheses --- <i>q</i>\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):86
msgid "Configuration"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):88
msgid "Introduction"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):91
msgid "To start zsh for a single session, run <c>zsh</c>. For a more permanent solution, please refer to the chapter on <uri link=\"#savingsettings\">Saving settings</uri>. After the installation, <c>zsh</c> seems to be very simple and rather limited in the area of functionality. To change this, several configuration changes need to be performed."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):102
msgid "Advanced Tab-completion"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):105
msgid "To enable the famous <c>zsh</c> tab-completion system, you need to run the following commands:"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):110
msgid "Enabling completion"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):110
#, no-wrap
msgid "\n% <i>autoload -U compinit</i>\n% <i>compinit</i>\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):115
msgid "Default completion style is quite plain and ugly. If you want to improve its appearance, enter the following commands:"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):120
msgid "Completion style improvements"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):120
#, no-wrap
msgid "\n% <i>zstyle ':completion:*:descriptions' format '%U%B%d%b%u'</i>\n% <i>zstyle ':completion:*:warnings' format '%BSorry, no matches for: %d%b'</i>\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):128
msgid "Command correction"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):131
msgid "It is also a good idea to enable the auto-correction of the commands typed:"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):135
msgid "Enabling correction"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):135
#, no-wrap
msgid "\n% <i>setopt correctall</i>\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):142
msgid "Prompts"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):145
msgid "The prompt may seem quite boring however, but we can fix it easily in several steps. First, we need to initialize advanced prompt support:"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):150
msgid "Enabling advanced prompts"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):150
#, no-wrap
msgid "\n% <i>autoload -U promptinit</i>\n% <i>promptinit</i>\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):155
msgid "Available prompts samples may be printed via the <c>prompt -p</c> command. Now we can activate our favorite one:"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):160
msgid "Choosing a sample prompt"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):160
#, no-wrap
msgid "\n<comment>(Replace gentoo with the prompt of your choice)</comment>\n% <i>prompt gentoo</i>\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(note):165
msgid "If you're playing around with the different prompts, and you don't want to see a sample of every one, you can use <c>prompt -l</c> to list the prompts available."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):171
msgid "Another option is to create your own prompt. To do this you will need to set the PS1 environment variable."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):176
msgid "A simple custom prompt"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):176
#, no-wrap
msgid "\n% <i>export PS1=\"[Test Prompt] &gt; \"</i>\n[Test Prompt] &gt;\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):181
msgid "While it is good to be able to create a custom text prompt, zsh also provides many escape sequences that allow system information to be inserted into the prompt. Some of the escape sequences available are:"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(th):189
msgid "Sequence"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(th):190
msgid "Printed"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):193
msgid "%T"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):194
msgid "System time (HH:MM)"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):197
msgid "%*"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):198
msgid "System time (HH:MM:SS)"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):201
msgid "%D"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):202
msgid "System date (YY-MM-DD)"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):205
msgid "%n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):206
msgid "Your username"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):209
msgid "%B - %b"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):210
msgid "Begin - end bold print"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):213
msgid "%U - %u"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):214
msgid "Begin - end underlining"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):217
msgid "%d"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):218
msgid "Your current working directory"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):221
msgid "%~"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):222
msgid "Your current working directory, relative to ~"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):225
msgid "%M"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):226
msgid "The computer's hostname"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):229
msgid "%m"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):230
msgid "The computer's hostname (truncated before the first period)"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):233
msgid "%l"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(ti):234
msgid "Your current tty"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):238
msgid "These escape sequences may simply be inserted into the environment variable, PS1, and zsh will parse them automatically."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):243
msgid "A more complex prompt"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):243
#, no-wrap
msgid "\n% <i>export PS1=\"[%* - %D] %d %% \"</i>\n[08:44:23 - 06-02-18] /home/username %\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):251
msgid "History"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):254
msgid "Unfortunately, the default zsh configuration in Gentoo does not include command history support. As working with a shell without history is very frustrating, we should enter the following commands:"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):260
msgid "Basic history configuration"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):260
#, no-wrap
msgid "\n% <i>export HISTSIZE=2000</i>\n% <i>export HISTFILE=\"$HOME/.history\"</i>\n\n<comment>(History won't be saved without the following command)</comment>\n% <i>export SAVEHIST=$HISTSIZE</i>\n"
msgstr ""

#. does not work
#. <p>
#. It is very comfortable to search commands in history using the up/down arrow
#. keys, especially after typing the few first letters of the desired command.
#. </p>
#. 
#. <p>
#. To enable this feature, enter the following commands:
#. </p>
#. 
#. <pre caption="Setting context searching">
#. % <i>bindkey `tput kcuu1` history-beginning-search-backward >/dev/null 2>&amp;1</i>
#. % <i>bindkey `tput kcud1` history-beginning-search-forward >/dev/null 2>&amp;1 </i>
#. </pre>
#. 
#. <p>
#. To try the above feature, try the following commands:
#. </p>
#. 
#. TODO: use commands that *are* in the history, i.e. commands from above samples
#. 
#. <pre caption="History searching based on the first letters of the commands">
#. <comment>(Do not press Enter after typing)</comment>
#. % <i>vim /etc/</i>
#. <comment>(Now press up arrow key)</comment>
#. % <i>vim /etc/fstab</i>
#. <comment>(Press up arrow key once again)</comment>
#. % <i>vim /etc/X11/xorg.conf</i>
#. </pre>
#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):299
msgid "To prevent history from recording duplicated entries (such as <c>ls -l</c> entered many times during single shell session), you can set the <c>hist_ignore_all_dups</c> option:"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):305
msgid "Setting ignoring of duplicates"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):305
#, no-wrap
msgid "\n% <i>setopt hist_ignore_all_dups</i>\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):309
msgid "A useful trick to prevent particular entries from being recorded into a history by preceding them with at least one space."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):314
msgid "Preventing particular entry from being recorded"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):314
#, no-wrap
msgid "\n% <i>setopt hist_ignore_space</i>\n\n<comment>(This command won't be recorded. Note the extra space before it.)</comment>\n% <i> cat /proc/cpuinfo</i>\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):324
msgid "Miscellaneous settings"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):327
msgid "You can set the <c>autocd</c> option if you want to avoid tedious typing of <c>cd</c> command while changing current directory (for example <c>/etc</c> instead of <c>cd /etc</c>)."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):333
msgid "Setting autocd option"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):333
#, no-wrap
msgid "\n% <i>setopt autocd</i>\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):337
msgid "If standard bash-like globbing does not satisfy you, <c>extendedglob</c> option may be set to enable extended globbing (one similar to regular expressions)."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):343
msgid "Setting extended globbing"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):343
#, no-wrap
msgid "\n% <i>setopt extendedglob</i>\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):347
msgid "When option above is set, you are able to use extended globbing queries such as <c>cp ^*.(tar|bz2|gz)</c>."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):357
msgid "Saving settings"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):359
msgid "Saving zsh settings"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):362
msgid "Once we have customized <c>zsh</c> the way we like it, it is a good idea to save these options as the <c>zsh</c> defaults for the system. One possible way to achieve this is to write our settings in the <path>/etc/zsh/zshrc</path> script. Alternatively, we could make them the defaults for our account only be editing <path>~/.zshrc</path>."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):370
msgid "An example zshrc"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):370
#, no-wrap
msgid "\n#!/bin/zsh\n\n# completion\nautoload -U compinit\ncompinit\n\n# correction\nsetopt correctall\n\n# prompt\nautoload -U promptinit\npromptinit\nprompt gentoo\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):391
msgid "Making zsh default shell"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):393
msgid "Option for users with root privileges"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):396
msgid "We can change shell for given user with <c>usermod</c> command."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):400
msgid "Switching to zsh permanently using usermod"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):400
#, no-wrap
msgid "\n# <i>usermod -s /bin/zsh userlogin</i>\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(title):407
msgid "Alternative for non-root users"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):410
msgid "If your system administrator (despite gentle requests, that is) refuses to set the shell to zsh for you, you can set <c>bash</c> to execute <c>zsh</c> on startup, all you need to do is make a slight modification to your <path>~/.bashrc</path>."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):417
msgid "Sample ~/.bashrc"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):417
#, no-wrap
msgid "\n<comment>(Add the following to your ~/.bashrc)</comment>\nexec zsh\n"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(p):422
msgid "Another method of changing shells is to use the <c>chsh</c> command (a utility used to change a user's login shell). A normal user may only change the login shell for his own account. As root, you can change the login shell of any user."
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre:caption):428
msgid "Switching to zsh permanently using chsh"
msgstr ""

#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(pre):428
#, no-wrap
msgid "\n<comment>(Replace \"username\" with your own username)</comment>\n$ <i>chsh -s /bin/zsh username</i>\n"
msgstr ""

#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL
#: ../../gentoo/xml/htdocs/doc/en//zsh.xml(None):0
msgid "translator-credits"
msgstr ""