aboutsummaryrefslogtreecommitdiffstats
path: root/modules/home/zsh.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/home/zsh.nix')
-rw-r--r--modules/home/zsh.nix22
1 files changed, 16 insertions, 6 deletions
diff --git a/modules/home/zsh.nix b/modules/home/zsh.nix
index 142d0b4..ec86d4b 100644
--- a/modules/home/zsh.nix
+++ b/modules/home/zsh.nix
@@ -66,6 +66,12 @@ in
# Remove stale compiled zsh files that shadow nix-managed configs
rm -f ~/.config/zsh/.zshrc.zwc ~/.config/zsh/{aliases,path,extras}.zwc
+ function set_terminal_title() {
+ printf '\033]0;%s@%s:%s\033\\' "$USER" "''${HOST%%.*}" "''${PWD/#$HOME/~}"
+ }
+ autoload -Uz add-zsh-hook
+ add-zsh-hook precmd set_terminal_title
+
eval "$(starship init zsh)"
source ~/.zsh_repos/marlonrichert/zsh-autocomplete/zsh-autocomplete.plugin.zsh
@@ -123,6 +129,16 @@ in
alias vim="nvim"
alias v="nvim"
+ function claude() {
+ if [[ -n "$TMUX" ]]; then
+ tmux rename-window "claude"
+ command claude "$@"
+ tmux set-window-option automatic-rename on
+ else
+ command claude "$@"
+ fi
+ }
+
alias dump-issues="getBjerkIssues > ~/Downloads/issues-$(date -I).json"
'';
@@ -172,12 +188,6 @@ in
--jq 'map({url, createdAt, title, labels: [.labels[].name], assignees: [.assignees[].login], body, number: "#\(.number)", comments: .comments | map({ body: .body, createdAt: .createdAt })})'
}
- function ssh() {
- printf '\033]0;ssh %s\033\\' "$*"
- command ssh "$@"
- printf '\033]0;%s@%s:%s\033\\' "$USER" "$HOST" "''${PWD/#$HOME/~}"
- }
-
function g() {
export GOOGLE_CLOUD_PROJECT="sokkel-sandbox"
export GOOGLE_CLOUD_LOCATION="europe-north1"