浏览代码

zshrc.d added

master
Dirk Alders 1年前
父节点
当前提交
a11005f07a

+ 3
- 0
.gitignore 查看文件

@@ -1,3 +1,6 @@
1
+# zshrc.d
2
+zshrc.d/*.zsh
3
+
1 4
 # ---> Linux
2 5
 *~
3 6
 

+ 5
- 8
zshrc 查看文件

@@ -256,14 +256,11 @@ if [ -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then
256 256
     ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#999'
257 257
 fi
258 258
 
259
-if [ ! `which powerline-daemon` == "" ]; then
260
-    powerline-daemon -q
261
-    . /usr/share/powerline/bindings/zsh/powerline.zsh
262
-fi
263
-
264
-if [ ! `which neofetch` == "" ]; then
265
-    neofetch
266
-fi
259
+# You may want to put all your additions into a folder file like
260
+# ~/.config_files/zshrc.d, instead of adding them here directly.
261
+for file in ~/.config_files/zshrc.d/*.zsh; do
262
+    source "$file"
263
+done
267 264
 
268 265
 # enable command-not-found if installed
269 266
 if [ -f /etc/zsh_command_not_found ]; then

+ 17
- 0
zshrc.d/__available__/aliases.zsh 查看文件

@@ -0,0 +1,17 @@
1
+# enable color support of ls and also add handy aliases
2
+if [ -x /usr/bin/dircolors ]; then
3
+    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
4
+    alias ls='ls --color=auto'
5
+    alias dir='dir -lh --color=auto'
6
+    #alias vdir='vdir --color=auto'
7
+
8
+    alias grep='grep --color=auto'
9
+    alias fgrep='fgrep --color=auto'
10
+    alias egrep='egrep --color=auto'
11
+fi
12
+
13
+# some more ls aliases
14
+alias ll='ls -alF'
15
+alias la='ls -A'
16
+alias l='ls -CF'
17
+alias less='less -iS'

+ 4
- 0
zshrc.d/__available__/aliases_extended.zsh 查看文件

@@ -0,0 +1,4 @@
1
+# some more ls aliases
2
+alias dd='dd status=progress'
3
+alias dd_status="watch -n5 'sudo kill -USR1 $(pgrep ^dd)'"
4
+alias ssh='ssh -X'

+ 4
- 0
zshrc.d/__available__/bin.zsh 查看文件

@@ -0,0 +1,4 @@
1
+# set PATH so it includes user's private bin if it exists
2
+if [ -d "$HOME/bin" ] ; then
3
+    PATH="$HOME/bin:$PATH"
4
+fi

+ 3
- 0
zshrc.d/__available__/neofetch.zsh 查看文件

@@ -0,0 +1,3 @@
1
+if [ ! `which neofetch` == "" ]; then
2
+    neofetch
3
+fi

+ 4
- 0
zshrc.d/__available__/powerline.zsh 查看文件

@@ -0,0 +1,4 @@
1
+if [ ! `which powerline-daemon` == "" ]; then
2
+    powerline-daemon -q
3
+    . /usr/share/powerline/bindings/zsh/powerline.zsh
4
+fi

正在加载...
取消
保存