summaryrefslogtreecommitdiff
path: root/gnu/system/shadow.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2026-02-19 10:41:31 +0100
committerLudovic Courtès <ludo@gnu.org>2026-02-27 23:54:00 +0100
commita1611ced6de6e58ec77641281a49ed368d7d8cef (patch)
tree36b942e2d7f0923c7136ed6f49cd0b984a2714d0 /gnu/system/shadow.scm
parent1892626390bac09f8942519c20cae4ace1758275 (diff)
system: gdbinit: Save command history by default.
By default, GDB does not save history. This improves on the default. * gnu/system/shadow.scm (%default-gdbinit): Add ‘set history’ commands. (gdb-history-placeholder): New variable. (default-skeletons): Add it. Change-Id: Ie3f9c26098066b4bd896b0593546015a1b429209 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Merges: #6559
Diffstat (limited to 'gnu/system/shadow.scm')
-rw-r--r--gnu/system/shadow.scm17
1 files changed, 15 insertions, 2 deletions
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index aa7aec782fa..f0749972d2c 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -1,5 +1,5 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013-2020, 2022-2023, 2025 Ludovic Courtès <ludo@gnu.org> 2;;; Copyright © 2013-2020, 2022-2023, 2025-2026 Ludovic Courtès <ludo@gnu.org>
3;;; Copyright © 2016 Alex Griffin <a@ajgrf.com> 3;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
4;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> 4;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
5;;; Copyright © 2020, 2023 Efraim Flashner <efraim@flashner.co.il> 5;;; Copyright © 2020, 2023 Efraim Flashner <efraim@flashner.co.il>
@@ -211,7 +211,13 @@ XTerm*metaSendsEscape: true\n"))
211 211
212(define %default-gdbinit 212(define %default-gdbinit
213 (plain-file "gdbinit" 213 (plain-file "gdbinit"
214 "# Tell GDB where to look for separate debugging files. 214 "\
215# Record command history.
216set history filename ~/.cache/gdb/history
217set history save on
218set history size 50000
219
220# Tell GDB where to look for separate debugging files.
215guile 221guile
216(use-modules (gdb)) 222(use-modules (gdb))
217(execute (string-append \"set debug-file-directory \" 223(execute (string-append \"set debug-file-directory \"
@@ -291,6 +297,12 @@ for a colorful Guile experience.\\n\\n\"))))\n"))
291 297
292home-config")) 298home-config"))
293 299
300(define gdb-history-placeholder
301 ;; Since GDB will not create ~/.cache/gdb by itself when attempting to save
302 ;; its history file, add a placeholder that ensures this directory exists.
303 (plain-file "gdb-history"
304 "# GDB command history.\n"))
305
294(define (default-skeletons) 306(define (default-skeletons)
295 "Return the default skeleton files for /etc/skel. These files are copied by 307 "Return the default skeleton files for /etc/skel. These files are copied by
296'useradd' in the home directory of newly created user accounts." 308'useradd' in the home directory of newly created user accounts."
@@ -308,6 +320,7 @@ home-config"))
308 (".Xdefaults" ,xdefaults) 320 (".Xdefaults" ,xdefaults)
309 (".guile" ,%default-dotguile) 321 (".guile" ,%default-dotguile)
310 (".config/gdb/gdbinit" ,gdbinit) 322 (".config/gdb/gdbinit" ,gdbinit)
323 (".cache/gdb/history" ,gdb-history-placeholder)
311 ("guix-home-config.scm" ,%default-skeleton-home-config)))) 324 ("guix-home-config.scm" ,%default-skeleton-home-config))))
312 325
313(define (skeleton-directory skeletons) 326(define (skeleton-directory skeletons)