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 117117 "match_prev_cmd"
118118 ]
119119 ) ;
120- default = [ "history" ] ;
120+ default = [
121+ "history"
122+ "completion"
123+ ] ;
121124 } ;
122125 } ;
123126
132135 default = false ;
133136 description = "save timestamps with history" ;
134137 } ;
138+ share = lib . mkOption {
139+ type = lib . types . bool ;
140+ default = false ;
141+ description = "share history between sessions" ;
142+ } ;
135143 save = lib . mkOption {
136144 type = lib . types . int ;
137145 default = 10000 ;
243251 "HISTSIZE=${ toString cfg . history . size } "
244252 "HISTSAVE=${ toString cfg . history . save } "
245253
254+ ( lib . optionalString cfg . history . append "setopt appendhistory" )
255+ ( lib . optionalString cfg . history . share "setopt sharehistory" )
256+ ( lib . optionalString cfg . history . ignoreSpace "setopt hist_ignore_space" )
257+ ( lib . optionalString cfg . history . ignoreAllDups "setopt hist_ignore_all_dups" )
258+ ( lib . optionalString cfg . history . ignoreDups "setopt hist_ignore_dups" )
259+ ( lib . optionalString cfg . history . saveNoDups "setopt hist_save_no_dups" )
260+ ( lib . optionalString cfg . history . findNoDups "setopt histfindnodups" )
261+ ( lib . optionalString cfg . history . expanded "setopt extendedhistory" )
262+
246263 "# Extra Content"
247264
248265 config . extraRC
274291
275292 flags = {
276293 "--histfcntllock" = true ;
277- "--histappend" = cfg . history . append ;
278294 "--histexpiredupsfirst" = cfg . history . expireDupsFirst ;
279- "--histfindnodups" = cfg . history . findNoDups ;
280- "--histignorealldups" = cfg . history . ignoreAllDups ;
281- "--histignoredups" = cfg . history . ignoreDups ;
282- "--histignorespace" = cfg . history . ignoreSpace ;
283- "--histsavenodups" = cfg . history . saveNoDups ;
284- "--histexpand" = cfg . history . expanded ;
285295 } ;
286296
287297 env . ZDOTDIR = builtins . toString (
You can’t perform that action at this time.
0 commit comments