From f13436939d71d87da0125850cd17ce91d821984f Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 18 Apr 2024 10:32:13 -0700 Subject: fixes in groq --- lib/common.nix | 10 +++++++++- lib/config.nix | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/common.nix b/lib/common.nix index 23fbead..6a87c78 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -134,6 +134,9 @@ in { # emacs-like history navigation "\\en" = "next-history"; "\\ep" = "previous-history"; + # groq-specific stuff + "\\er" = "redraw-current-line"; + "\\C-xt" = ''"$(_bake_targets)\e\C-e\er"''; }; extraConfig = '' $if Guile @@ -417,6 +420,9 @@ in { gawk 'match($0,/'$1'/, ary) {print ary['\$\{2:-'0'}']}'; } + # my old prompt, before i switched to starship + #export PS1='$(printf "%3.*s" $? $?)ϟ ' + # kill a process with fzf fkill() { local pid @@ -478,7 +484,8 @@ in { fzf_down --ansi --no-sort --reverse --multi --exact \ --bind 'ctrl-s:toggle-sort' \ --header 'Press CTRL-S to toggle sort' \ - --preview 'grep -o "[a-f0-9]\{7,\}" <<< {} | xargs git show --color=always |grep -o "[a-f0-9]\{7,\}" + --preview 'grep -o "[a-f0-9]\{7,\}" <<< {} | xargs git show --color=always | head -'$LINES | + grep -o "[a-f0-9]\{7,\}" } _gr() { @@ -488,6 +495,7 @@ in { --preview 'git log --oneline --graph --date=short --pretty="format:%C(auto)%cd %h%d %s" {1} | head -200' | cut -d$'\t' -f1 } + bind '"\er": redraw-current-line' bind '"\C-g\C-f": "$(_gf)\e\C-e\er"' bind '"\C-g\C-p": "$(_gp)\e\C-e\er"' diff --git a/lib/config.nix b/lib/config.nix index 12bcf15..45e3062 100644 --- a/lib/config.nix +++ b/lib/config.nix @@ -4,6 +4,7 @@ allowUnsupportedSystem = true; permittedInsecurePackages = [ "electron-13.6.9" + "electron-25.9.0" ]; cudaSupport = false; } -- cgit v1.2.3