pop-os: Add history filter to Atuin
This commit is contained in:
parent
c41b33cb0b
commit
f1854bb4f6
2 changed files with 18 additions and 5 deletions
|
@ -135,7 +135,9 @@
|
||||||
(service home-zsh-atuin-service-type
|
(service home-zsh-atuin-service-type
|
||||||
(home-zsh-atuin-configuration
|
(home-zsh-atuin-configuration
|
||||||
(inline-height 20)
|
(inline-height 20)
|
||||||
(filter-mode 'directory)))
|
(filter-mode 'directory)
|
||||||
|
(history-filter
|
||||||
|
'("^ +"))))
|
||||||
|
|
||||||
(service home-stumpwm-service-type
|
(service home-stumpwm-service-type
|
||||||
(home-stumpwm-configuration
|
(home-stumpwm-configuration
|
||||||
|
|
|
@ -143,12 +143,18 @@
|
||||||
(default-value (home-zsh-autopair-configuration))
|
(default-value (home-zsh-autopair-configuration))
|
||||||
(description "Install and configure zsh-autopair.")))
|
(description "Install and configure zsh-autopair.")))
|
||||||
|
|
||||||
|
(define (serialize-field-name field)
|
||||||
|
(string-replace-substring (symbol->string field) "-" "_"))
|
||||||
|
|
||||||
(define (serialize-integer field value)
|
(define (serialize-integer field value)
|
||||||
(format #f "~a = ~a~%" (string-replace-substring (symbol->string field) "-" "_") value))
|
(format #f "~a = ~a~%" (serialize-field-name field) value))
|
||||||
|
|
||||||
(define (serialize-filter-mode field value)
|
(define (serialize-filter-mode field value)
|
||||||
(format #f "~a = ~s~%" (string-replace-substring (symbol->string field) "-" "_")
|
(format #f "~a = ~s~%" (serialize-field-name field) (symbol->string value)))
|
||||||
(symbol->string value)))
|
|
||||||
|
(define (serialize-list-of-strings field value)
|
||||||
|
(format #f "~a = ~a~%" (serialize-field-name field)
|
||||||
|
(string-append "[" (string-join (map (λ (v) (format #f "~s" v)) value) ",") "]")))
|
||||||
|
|
||||||
(define (filter-mode? value)
|
(define (filter-mode? value)
|
||||||
(memq value '(global host session directory workspace)))
|
(memq value '(global host session directory workspace)))
|
||||||
|
@ -162,7 +168,12 @@
|
||||||
"Set the maximum number of lines Atuin’s interface should take up.")
|
"Set the maximum number of lines Atuin’s interface should take up.")
|
||||||
(filter-mode
|
(filter-mode
|
||||||
(filter-mode 'global)
|
(filter-mode 'global)
|
||||||
"The default filter to use when searching"))
|
"The default filter to use when searching")
|
||||||
|
(history-filter
|
||||||
|
(list-of-strings '())
|
||||||
|
"The history filter allows you to exclude commands from history tracking - maybe
|
||||||
|
you want to keep ALL of your curl commands totally out of your shell history, or
|
||||||
|
maybe just some matching a pattern."))
|
||||||
|
|
||||||
(define (add-zsh-atuin config)
|
(define (add-zsh-atuin config)
|
||||||
(home-zsh-extension
|
(home-zsh-extension
|
||||||
|
|
Loading…
Add table
Reference in a new issue