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

Refactor/Rename function name wrongly refuse colon #101

Closed
leagris opened this issue Feb 16, 2022 · 3 comments
Closed

Refactor/Rename function name wrongly refuse colon #101

leagris opened this issue Feb 16, 2022 · 3 comments

Comments

@leagris
Copy link

leagris commented Feb 16, 2022

Description

In BashSupportPro 2.1.4.213 Refactor/Rename… a function containing colon characters : is wrongly denied.

What happens

This wrong limitation prevents the Refactor/Rename… feature to be used to rename function names with a colon character.

What is expected

When building Bash-shell library files to be sourced, it is a common and valid practice to prefix function names
with the library name.

Namespacing like library_name::function_name prevents shadowing main Bash-script functions with name collisions.
Colons are perfectly legal for function names.
(They are only illegal for variable names.)

BashSupport Pro should not refuse to Refactor/Rename… function names containing colons.

Reproducing

Create a function:

function_name () { :;}

Place cursor over function_name and select Refactor/Rename… for example with:
shift+F6
and enter lib_name::func_name as the new name.

Here is how it wrongly refuses the rename:

image

@jansorg
Copy link
Contributor

jansorg commented Feb 17, 2022

@leagris Thank you for your feedback!
This has already been fixed for the 3.0 beta releases, https://plugins.jetbrains.com/plugin/13841-bashsupport-pro/eap-bashsupport-pro-3-0/changes

I've backported this change for the next update of 2.1. If you need this now or would like to make sure that it's what you need, please consider to use the already available beta version.

@leagris
Copy link
Author

leagris commented Feb 17, 2022

Thank-you, tested 3.0.0.213-beta4-eap and it now works as expected.

@leagris leagris closed this as completed Feb 17, 2022
@jansorg
Copy link
Contributor

jansorg commented Feb 18, 2022

Thanks for confirming! 2.0.5 with the backport is now also available.

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