feat: Readline

This commit is contained in:
Madeleine Sydney
2025-03-20 09:40:37 -06:00
parent c48a93ad10
commit 3a3e73c511
2 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sydnix.users.crumb.readline;
in {
options.sydnix.users.crumb.readline.enable
= lib.mkEnableOption "Readline, à la crumb";
config = lib.mkIf cfg.enable {
programs.readline = {
enable = true;
extraConfig = ''
# Unfortunately, the Vi mode is... bad!
set editing-mode emacs
# Mimmic Comint/Eshell binds.
C-k: history-substring-search-backward
C-j: history-substring-search-forward
C-s: reverse-search-history
set history-preserve-point on
set bell-style none
set blink-matching-paren on
# Inhibit that god-awful double-tab bullshit.
set show-all-if-ambiguous on
set show-all-if-unmodified on
set completion-ignore-case on
set completion-map-case on
# Append a '/' when completing the full name of a symlink to a
# directory. This mirrors the behaviour when completing real
# directories.
set mark-symlinked-directories on
# Visually hint at a file's type in completions.
set visible-stats on
set colored-stats on
'';
};
};
}