1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-18 01:53:22 -07:00

allow executables in ~/sh to begin with hyphens

This commit is contained in:
Connor Olding 2021-10-13 19:51:44 -07:00
parent 716d74ade2
commit fdcae6182f
2 changed files with 2 additions and 2 deletions

View File

@ -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
)

View File

@ -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 \