Initial commit

This commit is contained in:
Seoxi Ryouko
2025-05-04 21:22:13 -05:00
commit 5c96b62f2b
2 changed files with 28 additions and 0 deletions

20
ls_zero.bash Normal file
View File

@ -0,0 +1,20 @@
_ls() {
env ls "$@"
}
_lsp() {
printf "%s" "$*" | grep -qP '(\s|^)--zero(\s|$)'
local zero=$?
local args="$@"
declare -a args=(${args[@]/--zero/})
if test "$zero" -eq 0; then
output="$(_ls "${args[@]}")"
error=$?
printf "%s" "$output" | tr '\n' '\0'
return $error
fi
_ls "${args[@]}"
}
alias ls=_lsp