From 8851075c2764fecde2a112815d7958d5d29fb406 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Tue, 31 May 2022 15:34:33 -0400 Subject: feat(grfn/system): Resuscitate roswell Resuscitate the configuration for roswell, the semi-portable configuration I use for ec2 development boxes. Lots of the changes here are trying to get Tramp working. Change-Id: I2dc2fd1d9aa76e145fa3f3f847af761cb652ab47 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5798 Reviewed-by: grfn Autosubmit: grfn Tested-by: BuildkiteCI --- users/grfn/system/home/modules/shell.nix | 50 +++++++++++++++++--------------- 1 file changed, 27 insertions(+), 23 deletions(-) (limited to 'users/grfn/system/home/modules/shell.nix') diff --git a/users/grfn/system/home/modules/shell.nix b/users/grfn/system/home/modules/shell.nix index ed82292b0a..8d8d5884ce 100644 --- a/users/grfn/system/home/modules/shell.nix +++ b/users/grfn/system/home/modules/shell.nix @@ -68,7 +68,6 @@ in home.packages = with pkgs; [ zsh autojump - ntfy ]; home.sessionVariables = { @@ -133,6 +132,12 @@ in }; }]; + initExtraFirst = '' + if [[ "$TERM" = "dumb" ]]; then + return + fi + ''; + initExtraBeforeCompInit = '' zstyle ':completion:*' completer _complete _ignored _correct _approximate zstyle ':completion:*' matcher-list \'\' 'm:{[:lower:]}={[:upper:]} m:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._- :]=** r:|=**' 'l:|=* r:|=*' @@ -145,33 +150,32 @@ in ''; initExtra = '' - source ${./zshrc} - source ${pkgs.fetchFromGitHub { - owner = "zsh-users"; - repo = "zsh-syntax-highlighting"; - rev = "7678a8a22780141617f809002eeccf054bf8f448"; - sha256 = "0xh4fbd54kvwwpqvabk8lpw7m80phxdzrd75q3y874jw0xx1a9q6"; - }}/zsh-syntax-highlighting.zsh - source ${pkgs.autojump}/share/autojump/autojump.zsh - source ${pkgs.fetchFromGitHub { - owner = "chisui"; - repo = "zsh-nix-shell"; - rev = "a65382a353eaee5a98f068c330947c032a1263bb"; - sha256 = "0l41ac5b7p8yyjvpfp438kw7zl9dblrpd7icjg1v3ig3xy87zv0n"; - }}/nix-shell.plugin.zsh - - eval "$(${pkgs.ntfy}/bin/ntfy shell-integration)" - - export RPS1="" - autoload -U promptinit; promptinit - prompt pure + if [[ "$TERM" != "dumb" ]]; then + source ${./zshrc} + source ${pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-syntax-highlighting"; + rev = "7678a8a22780141617f809002eeccf054bf8f448"; + sha256 = "0xh4fbd54kvwwpqvabk8lpw7m80phxdzrd75q3y874jw0xx1a9q6"; + }}/zsh-syntax-highlighting.zsh + source ${pkgs.autojump}/share/autojump/autojump.zsh + source ${pkgs.fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "a65382a353eaee5a98f068c330947c032a1263bb"; + sha256 = "0l41ac5b7p8yyjvpfp438kw7zl9dblrpd7icjg1v3ig3xy87zv0n"; + }}/nix-shell.plugin.zsh + + export RPS1="" + autoload -U promptinit; promptinit + prompt pure + fi if [[ "$TERM" == "dumb" ]]; then unsetopt zle unsetopt prompt_cr unsetopt prompt_subst - unfunction precmd - unfunction preexec + unset zle_bracketed_paste export PS1='$ ' fi ''; -- cgit 1.4.1