Added alias to search git log

This commit is contained in:
alejandro-angulo 2024-09-20 22:43:30 -07:00
parent 4e55cab37e
commit b45b28fbba
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6
2 changed files with 14 additions and 2 deletions

View file

@ -48,7 +48,15 @@ in {
userEmail = cfg.userEmail;
aliases = {
# Prettier log
lol = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
# Find log and grab its hash
lof = ''
!${pkgs.git}/bin/git log --pretty=oneline \
| ${pkgs.fzf}/bin/fzf --scheme history \
| ${pkgs.gawk}/bin/awk '{print $1}'
'';
# Push up a new branch with the same as local
pushup = "push -u origin HEAD";
};

View file

@ -2,6 +2,7 @@
config,
inputs,
lib,
pkgs,
namespace,
...
}: let
@ -27,10 +28,13 @@ in {
bindkey '^A' beginning-of-line
bindkey '^E' end-of-line
bindkey '^R' history-incremental-search-backward
alias view="nvim -R $1"
alias l='ls -la'
'';
shellAliases = {
view = "${pkgs.neovim}/bin/nvim -R $1";
l = "ls -la";
};
plugins = [
{
name = "zsh-syntax-highlighting";