File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed
Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change 101101 "match_prev_cmd"
102102 ]
103103 ) ;
104- default = [ "history" ] ;
104+ default = [
105+ "history"
106+ "completion"
107+ ] ;
105108 } ;
106109 } ;
107110
116119 default = false ;
117120 description = "save timestamps with history" ;
118121 } ;
122+ share = lib . mkOption {
123+ type = lib . types . bool ;
124+ default = false ;
125+ description = "share history between sessions" ;
126+ } ;
119127 save = lib . mkOption {
120128 type = lib . types . int ;
121129 default = 10000 ;
225233 "HISTSIZE=${ toString cfg . history . size } "
226234 "HISTSAVE=${ toString cfg . history . save } "
227235
236+ ( lib . optionalString cfg . history . append "setopt appendhistory" )
237+ ( lib . optionalString cfg . history . share "setopt sharehistory" )
238+ ( lib . optionalString cfg . history . ignoreSpace "setopt hist_ignore_space" )
239+ ( lib . optionalString cfg . history . ignoreAllDups "setopt hist_ignore_all_dups" )
240+ ( lib . optionalString cfg . history . ignoreDups "setopt hist_ignore_dups" )
241+ ( lib . optionalString cfg . history . saveNoDups "setopt hist_save_no_dups" )
242+ ( lib . optionalString cfg . history . findNoDups "setopt histfindnodups" )
243+ ( lib . optionalString cfg . history . expanded "setopt extendedhistory" )
244+
228245 "# Extra Content"
229246
230247 config . extraRC
254271
255272 flags = {
256273 "--histfcntllock" = true ;
257- "--histappend" = cfg . history . append ;
258274 "--histexpiredupsfirst" = cfg . history . expireDupsFirst ;
259- "--histfindnodups" = cfg . history . findNoDups ;
260- "--histignorealldups" = cfg . history . ignoreAllDups ;
261- "--histignoredups" = cfg . history . ignoreDups ;
262- "--histignorespace" = cfg . history . ignoreSpace ;
263- "--histsavenodups" = cfg . history . saveNoDups ;
264- "--histexpand" = cfg . history . expanded ;
265275 } ;
266276
267277 env . ZDOTDIR = builtins . toString (
You can’t perform that action at this time.
0 commit comments