zsh: add "cite" function

This commit is contained in:
Jez Cope 2022-04-26 15:53:21 +01:00
parent e0bc8631b4
commit 040c5e6c60
1 changed files with 6 additions and 2 deletions

View File

@ -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 = {