about summary refs log tree commit diff stats
path: root/nix-conf
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-11-14 08:10:30 +0000
committerDavid Morgan <djm_uk@protonmail.com>2022-11-14 08:10:30 +0000
commitfb46fc7654bfa25a77c7a0bd60f137a4017d806f (patch)
tree2a2bbbb46c9b280a56b0116cd6c7e1c735a707bc /nix-conf
parenta3574e700b8515deebcf89f69970ee8619585ff4 (diff)
downloaddotfiles-fb46fc7654bfa25a77c7a0bd60f137a4017d806f.tar.gz
Add file preview alias with fzf and bat
Diffstat (limited to 'nix-conf')
-rw-r--r--nix-conf/home/includes/zsh.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/nix-conf/home/includes/zsh.nix b/nix-conf/home/includes/zsh.nix
index 6d9dbda..3b6f8bf 100644
--- a/nix-conf/home/includes/zsh.nix
+++ b/nix-conf/home/includes/zsh.nix
@@ -50,12 +50,17 @@
       cp = "cp -iv";
       mv = "mv -iv";
       mkdir = "mkdir -v";
+
       pp = "pushbullet push \"Pixel\" link \"\${1}\" \"\${1}\"";
+
       upgrade_emacs = "cp ~/.emacs.d/straight/versions/default.el ~/straight-versions-default-`date \"+%Y-%m-%d-%H%M%S\"`.el && emacs --batch -l \"~/.emacs.d/init.el\" -f \"my/upgrade-packages\"";
       diff_emacs = "difft --color always --context 0 $(ls -d1v ~/straight-versions-default-*.el | tail -1) ~/.emacs.d/straight/versions/default.el | grep '\\[9[12]' | egrep -v '(gnu-elpa-mirror|nongnu-elpa|melpa|emacsmirror-mirror)'";
+
       nix-up = "git -C ~/dotfiles pull && doas nix-channel --update && doas nixos-rebuild switch && nix-channel --update && home-manager switch && system-changes-report && hm-changes-report && df -h && date";
       home-up = "git -C ~/dotfiles pull && nix-channel --update && home-manager switch && hm-changes-report";
 
+      fb = "fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'";
+
       # Git log aliases from the omz git plugin
       gl = "git pull";
       glg = "git log --stat";