From 4743b635aa2af4bf1673ab1197cce18b28b6c534 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Tue, 10 Jun 2025 09:07:56 -0700 Subject: [PATCH] Update zshrc.d --- dotfiles/zshrc.d/assemble.zsh | 2 +- dotfiles/zshrc.d/crouton.zsh | 7 ------- dotfiles/zshrc.d/gpg.zsh | 2 +- dotfiles/zshrc.d/ipython.zsh | 2 +- 4 files changed, 3 insertions(+), 10 deletions(-) delete mode 100644 dotfiles/zshrc.d/crouton.zsh diff --git a/dotfiles/zshrc.d/assemble.zsh b/dotfiles/zshrc.d/assemble.zsh index 8814484..3677c91 100644 --- a/dotfiles/zshrc.d/assemble.zsh +++ b/dotfiles/zshrc.d/assemble.zsh @@ -1,4 +1,4 @@ -if [ -f "`command which nasm 2>/dev/null`" -a -f "`command which objdump 2>/dev/null`" ] ; then +if have_command nasm && have_command objdump ; then assemble_shellcode() { if [ -z "$1" ] ; then echo "Usage: $0 " >&2 ; return 1 ; fi local NASM=`command which nasm` diff --git a/dotfiles/zshrc.d/crouton.zsh b/dotfiles/zshrc.d/crouton.zsh deleted file mode 100644 index 243dbab..0000000 --- a/dotfiles/zshrc.d/crouton.zsh +++ /dev/null @@ -1,7 +0,0 @@ -if command -v xiwi >/dev/null 2>&1; then - function xiwibg { - local tmpf=$(mktemp) - echo Logging to ${tmpf} - nohup xiwi "$@" >!${tmpf} 2>&1 & - } -fi diff --git a/dotfiles/zshrc.d/gpg.zsh b/dotfiles/zshrc.d/gpg.zsh index c40d990..018daf0 100644 --- a/dotfiles/zshrc.d/gpg.zsh +++ b/dotfiles/zshrc.d/gpg.zsh @@ -25,7 +25,7 @@ fi export GPG_TTY="$(tty)" # Setup SSH agent support -if grep '^enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then +if grep -q '^enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then # Load required functions. autoload -Uz add-zsh-hook diff --git a/dotfiles/zshrc.d/ipython.zsh b/dotfiles/zshrc.d/ipython.zsh index 11e605f..c8dfcac 100644 --- a/dotfiles/zshrc.d/ipython.zsh +++ b/dotfiles/zshrc.d/ipython.zsh @@ -1,3 +1,3 @@ -if command -v ipython >/dev/null || command -v ipython3 >/dev/null ; then +if have_command ipython || have_command ipython3 ; then export PYTHONSTARTUP="${HOME}/.ipython.py" fi