Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove array if possible #45

Closed
LucasLarson opened this issue Jan 22, 2021 · 0 comments
Closed

remove array if possible #45

LucasLarson opened this issue Jan 22, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@LucasLarson
Copy link
Owner

we might be able to remove the files array:

gunstage/bin/git-unstage

Lines 29 to 31 in 4d58de8

files=(
"${@:-.}"
)

and replace the for loop’s files iterator:

for file in "${files[@]}"; do

with an ${if:-else} substitution like this:

for file in "${@:-.}"; do

If the array is gone, then both scripts will be POSIX-compliant and we’ll change these

#!/usr/bin/env bash

#!/usr/bin/env bash

to this

#!/usr/bin/env sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant