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

.zsh_functions:161: defining function based on alias `chgext' #40

Closed
BrianGilbert opened this issue Apr 14, 2018 · 3 comments
Closed

.zsh_functions:161: defining function based on alias `chgext' #40

BrianGilbert opened this issue Apr 14, 2018 · 3 comments

Comments

@BrianGilbert
Copy link
Contributor

I get the following error every time I open a terminal window

/Users/brian/.zsh_functions:161: defining function based on alias `chgext'
/Users/brian/.zsh_functions:161: parse error near `()'

Made the following change which seems to fix it:

# Batch change extension from $1 to $2
chgext() {
  for file in *.$1
  do
    mv $file $(echo $file | sed "s/\(.*\.\)$1/\1$2/")
  done
}

became

# Batch change extension from $1 to $2
function chgext {
  for file in *.$1
  do
    mv $file $(echo $file | sed "s/\(.*\.\)$1/\1$2/")
  done
}
BrianGilbert added a commit to BrianGilbert/zsh-quickstart-kit that referenced this issue Apr 14, 2018
unixorn added a commit that referenced this issue Apr 14, 2018
[#40] Fixed error line 161 defining function chgext.
@BrianGilbert
Copy link
Contributor Author

@unixorn This should be closeable now given the PR has been merged, or are you waiting for next release?

@unixorn
Copy link
Owner

unixorn commented Apr 15, 2018

No, I haven't been doing separate releases since it installs via a git clone.

@unixorn unixorn closed this as completed Apr 15, 2018
@unixorn
Copy link
Owner

unixorn commented Apr 15, 2018

thanks for fixing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants