-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Fix for zsh issue #222
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
Fix for zsh issue #222
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -351,8 +351,9 @@ kvm() | |
fi | ||
echo "" | ||
|
||
local arr=() | ||
local i=0 | ||
local arr | ||
arr=() | ||
local i=1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are zsh arrays 1-indexed? This will break in bash because the arrays are 0-indexed there. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. --Actually, it might not break but you will have an empty first element and this could cause weird bugs later when people are not aware of that-- Scratch that. It might break because of the foreach loop that follows There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure I tested this out in both bash and zsh. It works without issues. This PR is actually merged in the kvm repo. I am porting the fix There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. okay... I'm a little surprised it works :) |
||
local format="%-20s %s\n" | ||
for _kvm_file in $(find "$KRE_USER_HOME/alias" -name *.alias); do | ||
arr[$i]="$(basename $_kvm_file | sed 's/.alias//')/$(cat $_kvm_file)" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird must be some github thing. If you see the entire file it is indented correctly