From 154f1a66e59596d222165543185ad4763ae6f989 Mon Sep 17 00:00:00 2001 From: Jason Swank Date: Sat, 31 Jan 2026 22:39:46 -0500 Subject: [PATCH] zsh: minor prompt update --- zsh/.local/share/zsh/functions/_eph | 21 +++++++++++++++++++++ zsh/.zshrc | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 zsh/.local/share/zsh/functions/_eph diff --git a/zsh/.local/share/zsh/functions/_eph b/zsh/.local/share/zsh/functions/_eph new file mode 100644 index 0000000..80b3e93 --- /dev/null +++ b/zsh/.local/share/zsh/functions/_eph @@ -0,0 +1,21 @@ +#compdef eph +_eph() { + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + '(-h --help)'{-h,--help}'[display help]' \ + '--completion[generate completion script]:shell:(zsh)' \ + '--list[list all containers]' \ + '1: :->containers' + + case $state in + containers) + local -a subcmds + subcmds=(${(f)"$(lxc ls -c n -f csv 2>/dev/null)"}) + _describe 'containers' subcmds + ;; + esac +} + +_eph "$@" diff --git a/zsh/.zshrc b/zsh/.zshrc index 7024314..85308f0 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -56,9 +56,9 @@ function set_prompt() { aws_prompt="" fi if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then - PROMPT=$aws_prompt"%B${vcs_info_msg_0_}> %b" + PROMPT=$aws_prompt"%B${vcs_info_msg_0_}▶ %b" else - PROMPT=$aws_prompt"%B%m:%~> %b" + PROMPT=$aws_prompt"%B%m:%~▶ %b" fi } precmd_functions+=( set_prompt )