Emacs: Show numerical nix generation even for system profiles
Alan Pearce alan@alanpearce.eu
Sat, 15 Jul 2017 15:08:25 +0200
1 files changed, 6 insertions(+), 4 deletions(-)
jump to
M emacs/.emacs.d/init.org → emacs/.emacs.d/init.org
@@ -301,9 +301,11 @@ (list " (Nix Generation " (cadr (split-string (f-base (car - (last (split-string - (s-chomp (shell-command-to-string (concat "nix-store -q --roots " invocation-directory))) - "\n")))) + (last (seq-take-while + (lambda (s) (s-contains? "profile" s)) + (split-string + (s-chomp (shell-command-to-string (concat "nix-store -q --roots " invocation-directory))) + "\n"))))) "-")) " " (s-left 6 (nth 3 (f-split invocation-directory))) @@ -311,7 +313,7 @@ "..." (s-right 6 (car (split-string (nth 3 (f-split invocation-directory)) "-"))) ")")) '(buffer-file-name " — %f") - '(dired-directory (" — " dired-directory)))) + '(dired-directory (" — " dired-directory)))) #+END_SRC ** Chrome