-
Notifications
You must be signed in to change notification settings - Fork 1
/
Zsh.txt
112 lines (81 loc) · 3.64 KB
/
Zsh.txt
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
Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: 2016-12-17T16:16:20+01:00
====== Zsh ======
Created lørdag 17 december 2016
**Zsh is an alternate, improved, version from the Bash shell (default).**
**My **//.zshrc//** file can be found at Github**
== Installation ==
$ pacman -S zsh
**# Then make it the default Shell - don't run with sudo!**
$ chsh -s /bin/zsh
**# For the **//Fish//**-like syntax highligthing**
$ pacman -S zsh-syntax-highlighting
== Configuring $PATH ==
**# Paths should be set in a different configuration, since there is some source conflict with /etc/profile**
**# To prevent the path from being overwritten, set it in **//~/.zprofile//
{{{code: lang="texinfo" linenumbers="True"
typeset -U path
path=(~/bin /home/stick/.scripts /usr/local/bin $path[@])
}}}
===== Configuration =====
**# User configuration is found in **//~/.zshrc//
**# My Zsh configuration file can be found at Github. **
== Search official repositories when a command was invalid ==
**#** **This requires the pkgfile package **
$ pacman -S pkgfile
**#** **Once installed the pkgfile database can be synced with **
$ pkgfile -u
**#** **Enable its system timer servce **
$ systemctl enable pkgfile-update.timer
**# Then add the following to the **//~/.zshrc//** file **
**#** **This is already incl. in my configuration. Just make sure the package is installed.**
{{{code: lang="texinfo" linenumbers="True"
source /usr/share/doc/pkgfile/command-not-found.zsh
}}}
== Defining Keybinds ==
**# To get a key-value, first hit **//Ctrl+v//** and then push the key (or key combo) to get its value**
**# That value can be used in a **//bindkey//** variable to define its action, ex;**
**# (Control+Delete to delete forward word) **//Ctrl+v Ctrl+Delete //** outputs **//^[[3^//
**# Then we define the action of that value in the our **//.zshrc //
**#** **( **//kill-word//** is the command to forward delete word)**
{{{code: lang="texinfo" linenumbers="True"
bindkey '^[[3^' kill-word
}}}
===== Oh my Zsh =====
**# OMZsh is a shitload of additional functions and themes ready to use out-the-box**
**# Below is still just added to the **//.zshrc//** file - OMZsh just adds a little extra.**
**# A further explained (example) OMZsh **//.zshrc//** file can be found at **///usr/share/oh-my-zsh/zshrc//
== Install from the AUR ==
$ yaourt -S oh-my-zsh-git
== Themes ==
**# Original (supported) themes can be found at **https://github.com/robbyrussell/oh-my-zsh/wiki/themes
**# I've found this one to be quite lovely**
{{{code: lang="texinfo" linenumbers="True"
ZSH_THEME="ys"
}}}
== Functions ==
**# Functions are added to the **//plugins=()//** line (space separated list)**
**# A full list of functions can be found here **https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins
**# Below is a list of favorites^**
**# dirhistory**
**# Allows you to navigate back and forth in directories (history) with the arrow keys**
**# Usage : **//ALT+left ALT+right //
**# encode64**
**# Encode/decode base64**
**# Usage : **//encode64 <string> decode64 <string>//
**# screen**
**# Automaticly sets title and status for **Gnu Screen
**# sudo**
**# **//ESC//** twice to put sudo infront of current command**
**# urltools**
**# For URL manipulation. Encode/decode the RFC 1738 standard**
**# Usage : **//urlencode <string> urldecode <string>//
**# web-search**
**# adds **//bing, google, yahoo //**and **//DUCKDUCKGO! //**to command web search**
**# Usage : **//ddg <search> google <search> //
**# ssh-agent**
**# Add the following to your **//.zshrc//** file to enable (already included in my configuration)**
{{{code: lang="texinfo" linenumbers="True"
zstyle :omz:plugins:ssh-agent agent-forwarding on
}}}