Skip to content

Commit

Permalink
refactor: acquire sanitized directory name faster
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Larson <[email protected]>
  • Loading branch information
LucasLarson committed May 8, 2024
1 parent 54ad47b commit a9324a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom/aliases.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ cleanup() {
# `Applications`, `Desktop`, `Documents`, `Downloads`, `Library`, `Movies`, `Music`, `Pictures`, `Public`, and `Sites`
# https://web.archive.org/web/0id_/developer.apple.com/library/mac/documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW9
test "${PWD%/*}" = "${HOME%/}" &&
case "$(command pwd -P | command tr -d '[:space:]' | command xargs basename -- | command cut -c 1)" in
case "$(command pwd -P | command sed -e 's/.*\/[[:space:]]*//')" in
[A-Z])
printf -- '\n\n'
printf -- '\342\233\224\357\270\217 aborting: refusing to run from a macOS standard directory\n'
Expand Down

0 comments on commit a9324a1

Please sign in to comment.