From fdcae6182f27c1576a2ec45ea4d7eca018e362be Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Wed, 13 Oct 2021 19:51:44 -0700 Subject: [PATCH] allow executables in ~/sh to begin with hyphens --- home/bashrc | 2 +- home/zshrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/home/bashrc b/home/bashrc index 5d98e70..76fb362 100644 --- a/home/bashrc +++ b/home/bashrc @@ -38,7 +38,7 @@ ADDPATH "$HOME/sh" # unlike zsh, we do not check the sha1sum of the output. cd ~/sh \ && printf "%s\n" '#!/usr/bin/env false' '[ -n "$preload" ] || exit 1' '' \ - | cat - $(grep -lF 'YES_BASH' $(find ~/sh -maxdepth 1 -type f)) \ + | cat - $(grep -lF YES_BASH -- $(find ~/sh -maxdepth 1 -type f)) \ > ~/.sh-bash ) diff --git a/home/zshrc b/home/zshrc index 01813aa..902455b 100644 --- a/home/zshrc +++ b/home/zshrc @@ -57,7 +57,7 @@ function { [ -s ~/.sh.sha1 ] && read -r b _ < ~/.sh.sha1 ( cd ~/sh \ && print -l '#!/usr/bin/env false' '[ -n "$preload" ] || exit 1' '' \ - | cat - $(grep -lF 'YES_ZSH' *~*.bak(.)) \ + | cat - $(grep -lF YES_ZSH -- *~*.bak(.)) \ | tee ~/.sh \ ) | sha1sum - \ | tee ~/.sh.sha1 \