Browse Source

improvement of arch adaptions

master
Dirk Alders 1 year ago
parent
commit
b83c166d18

+ 5
- 10
.zshrc View File

@@ -103,16 +103,11 @@ alias ll='ls -l'
103 103
 alias la='ls -A'
104 104
 alias l='ls -CF'
105 105
 
106
-# enable auto-suggestions based on the history for most systems
107
-if [ -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then
108
-    . /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
109
-    # change suggestion color
110
-    ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#999'
111
-fi
112
-if [ -f /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then
113
-    . /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
114
-    # change suggestion color
115
-    ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#999'
106
+# set zsh plugin base directory
107
+if [ -d /usr/share/zsh/plugins ]; then
108
+    export ZSH_PLUGIN_BASE="/usr/share/zsh/plugins"
109
+else
110
+    export ZSH_PLUGIN_BASE="/usr/share"
116 111
 fi
117 112
 
118 113
 # You may want to put all your additions into a folder file like

+ 6
- 0
.zshrc.d/__available__/prompt_autosuggest.zsh View File

@@ -0,0 +1,6 @@
1
+# enable auto-suggestions based on the history for most systems
2
+if [ -f $ZSH_PLUGIN_BASE/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then
3
+    . $ZSH_PLUGIN_BASE/zsh-autosuggestions/zsh-autosuggestions.zsh
4
+    # change suggestion color
5
+    ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#999'
6
+fi

+ 2
- 48
.zshrc.d/__available__/prompt_color.zsh View File

@@ -1,6 +1,6 @@
1 1
 # enable syntax-highlighting
2
-if [ -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
3
-    . /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
2
+if [ -f $ZSH_PLUGIN_BASE/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
3
+    . $ZSH_PLUGIN_BASE/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
4 4
     ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern)
5 5
     ZSH_HIGHLIGHT_STYLES[default]=none
6 6
     ZSH_HIGHLIGHT_STYLES[unknown-token]=fg=white,underline
@@ -45,49 +45,3 @@ if [ -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
45 45
     ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]=standout
46 46
 fi
47 47
 
48
-# enable syntax-highlighting
49
-if [ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
50
-    . /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
51
-    ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern)
52
-    ZSH_HIGHLIGHT_STYLES[default]=none
53
-    ZSH_HIGHLIGHT_STYLES[unknown-token]=fg=white,underline
54
-    ZSH_HIGHLIGHT_STYLES[reserved-word]=fg=cyan,bold
55
-    ZSH_HIGHLIGHT_STYLES[suffix-alias]=fg=green,underline
56
-    ZSH_HIGHLIGHT_STYLES[global-alias]=fg=green,bold
57
-    ZSH_HIGHLIGHT_STYLES[precommand]=fg=green,underline
58
-    ZSH_HIGHLIGHT_STYLES[commandseparator]=fg=blue,bold
59
-    ZSH_HIGHLIGHT_STYLES[autodirectory]=fg=green,underline
60
-    ZSH_HIGHLIGHT_STYLES[path]=bold
61
-    ZSH_HIGHLIGHT_STYLES[path_pathseparator]=
62
-    ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]=
63
-    ZSH_HIGHLIGHT_STYLES[globbing]=fg=blue,bold
64
-    ZSH_HIGHLIGHT_STYLES[history-expansion]=fg=blue,bold
65
-    ZSH_HIGHLIGHT_STYLES[command-substitution]=none
66
-    ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]=fg=magenta,bold
67
-    ZSH_HIGHLIGHT_STYLES[process-substitution]=none
68
-    ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]=fg=magenta,bold
69
-    ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=fg=green
70
-    ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=fg=green
71
-    ZSH_HIGHLIGHT_STYLES[back-quoted-argument]=none
72
-    ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]=fg=blue,bold
73
-    ZSH_HIGHLIGHT_STYLES[single-quoted-argument]=fg=yellow
74
-    ZSH_HIGHLIGHT_STYLES[double-quoted-argument]=fg=yellow
75
-    ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]=fg=yellow
76
-    ZSH_HIGHLIGHT_STYLES[rc-quote]=fg=magenta
77
-    ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]=fg=magenta,bold
78
-    ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]=fg=magenta,bold
79
-    ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]=fg=magenta,bold
80
-    ZSH_HIGHLIGHT_STYLES[assign]=none
81
-    ZSH_HIGHLIGHT_STYLES[redirection]=fg=blue,bold
82
-    ZSH_HIGHLIGHT_STYLES[comment]=fg=black,bold
83
-    ZSH_HIGHLIGHT_STYLES[named-fd]=none
84
-    ZSH_HIGHLIGHT_STYLES[numeric-fd]=none
85
-    ZSH_HIGHLIGHT_STYLES[arg0]=fg=cyan
86
-    ZSH_HIGHLIGHT_STYLES[bracket-error]=fg=red,bold
87
-    ZSH_HIGHLIGHT_STYLES[bracket-level-1]=fg=blue,bold
88
-    ZSH_HIGHLIGHT_STYLES[bracket-level-2]=fg=green,bold
89
-    ZSH_HIGHLIGHT_STYLES[bracket-level-3]=fg=magenta,bold
90
-    ZSH_HIGHLIGHT_STYLES[bracket-level-4]=fg=yellow,bold
91
-    ZSH_HIGHLIGHT_STYLES[bracket-level-5]=fg=cyan,bold
92
-    ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]=standout
93
-fi

+ 1
- 0
.zshrc.d/my_defaults View File

@@ -3,6 +3,7 @@ ln -vs __available__/dd.zsh
3 3
 ln -vs __available__/less.zsh
4 4
 ln -vs __available__/neofetch.zsh
5 5
 ln -vs __available__/prompt_color.zsh
6
+ln -vs __available__/prompt_autosuggest.zsh
6 7
 ln -vs __available__/prompt_powerline.zsh
7 8
 ln -vs __available__/todo.zsh
8 9
 

+ 1
- 0
.zshrc.d/root_defaults View File

@@ -1,4 +1,5 @@
1 1
 ln -vs __available__/less.zsh
2 2
 ln -vs __available__/prompt_color.zsh
3
+ln -vs __available__/prompt_autosuggest.zsh
3 4
 ln -vs __available__/prompt_powerline.zsh
4 5
 

Loading…
Cancel
Save