From 040c5e6c60594ebdfd8952c8fe55e376b530fc09 Mon Sep 17 00:00:00 2001 From: Jez Cope Date: Tue, 26 Apr 2022 15:53:21 +0100 Subject: [PATCH] zsh: add "cite" function --- home/profiles/shell/zsh.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/home/profiles/shell/zsh.nix b/home/profiles/shell/zsh.nix index 6315db4..203c295 100644 --- a/home/profiles/shell/zsh.nix +++ b/home/profiles/shell/zsh.nix @@ -14,12 +14,12 @@ ns = "nix search nixpkgs"; - lg = pkgs.lazygit + ./bin/lazygit; + lg = pkgs.lazygit + /bin/lazygit; }; sessionVariables = { ZSH_CUSTOM = ./zsh/omz-custom; }; initExtra = '' - function export-emacs { + export-emacs () { if [ "$(emacsclient -e t)" != 't' ]; then return 1 fi @@ -29,6 +29,10 @@ emacsclient -e "(setenv \"''${name}\" \"''${value}\")" >/dev/null done } + + cite () { + http --follow --body "https://doi.org/$1" "Accept: text/x-bibliography; style=chicago-author-date" + } ''; oh-my-zsh = {