From 465bfc101d3e58ee930fb3aa2366a9e16897c3b9 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sat, 21 Sep 2024 05:46:36 +0100 Subject: [PATCH] Add carapace completion, remove fish and zsh --- system/home/shell/default.nix | 33 +-------------------------------- system/home/shell/transient.zsh | 31 ------------------------------- 2 files changed, 1 insertion(+), 63 deletions(-) delete mode 100755 system/home/shell/transient.zsh diff --git a/system/home/shell/default.nix b/system/home/shell/default.nix index c2628244..778a2db2 100644 --- a/system/home/shell/default.nix +++ b/system/home/shell/default.nix @@ -17,8 +17,8 @@ ]; programs = { bash.enable = true; + carapace.enable = true; fastfetch.enable = true; - fish.enable = true; fd.enable = true; jq.enable = true; nix-index.enable = true; @@ -97,36 +97,5 @@ copy_on_select = true; }; }; - zsh = { - enable = true; - enableCompletion = true; - autocd = true; - autosuggestion.enable = true; - defaultKeymap = "emacs"; - syntaxHighlighting = { - enable = true; - highlighters = [ - "brackets" - "cursor" - ]; - }; - historySubstringSearch.enable = true; - history = { - extended = true; - share = true; - ignoreDups = true; - ignoreAllDups = true; - ignoreSpace = true; - expireDuplicatesFirst = true; - }; - initExtra = '' - ## completion config and styling - zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' - zstyle ':completion:*' menu 'select=long-list' - - ## transient prompt - source ${./transient.zsh} - ''; - }; }; } diff --git a/system/home/shell/transient.zsh b/system/home/shell/transient.zsh deleted file mode 100755 index 1f7bbd82..00000000 --- a/system/home/shell/transient.zsh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env zsh - -zle-line-init() { - emulate -L zsh - - [[ $CONTEXT == start ]] || return 0 - - while true; do - zle .recursive-edit - local -i ret=$? - [[ $ret == 0 && $KEYS == $'\4' ]] || break - [[ -o ignore_eof ]] || exit 0 - done - - local saved_prompt=$PROMPT - local saved_rprompt=$RPROMPT - PROMPT='󰁔 ' - RPROMPT='' - zle .reset-prompt - PROMPT=$saved_prompt - RPROMPT=$saved_rprompt - - if ((ret)); then - zle .send-break - else - zle .accept-line - fi - return ret -} - -zle -N zle-line-init