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

[bug] Running alias ..=cd .. removes other aliases #2394

Closed
1 of 3 tasks
xy2z opened this issue Sep 27, 2020 · 11 comments
Closed
1 of 3 tasks

[bug] Running alias ..=cd .. removes other aliases #2394

xy2z opened this issue Sep 27, 2020 · 11 comments

Comments

@xy2z
Copy link

xy2z commented Sep 27, 2020

Purpose of the issue

  • Bug report (encountered problems/errors)
  • Feature request (request for new functionality)
  • Question

Version Information

  • Cmder: Version 1.3.16.1035
  • OS: Windows 10 Pro (version 1909)

Description of the issue

⚠ Warning: This may remove your custom aliases.

  1. Run alias ..=cd ..
  2. Restart cmder
  3. Open cmder and run alias - some of your aliases have been removed.

Screenshots

before
(restart cmder)

after

@stale
Copy link

stale bot commented Oct 31, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contribution(s).

@stale stale bot added the 👀 Awaiting Response Waiting to hear back from the issue reporter. label Oct 31, 2020
@xy2z
Copy link
Author

xy2z commented Nov 1, 2020

pls fix

@stale stale bot removed the 👀 Awaiting Response Waiting to hear back from the issue reporter. label Nov 1, 2020
@daxgames
Copy link
Member

daxgames commented Nov 6, 2020

@xy2z Works for me.

image

@xy2z
Copy link
Author

xy2z commented Nov 6, 2020

@daxgames did you restart cmder?

@daxgames
Copy link
Member

daxgames commented Nov 7, 2020

In the screenshot above , no. I have since restarted though and it works fine. All aliases are there..

@daxgames
Copy link
Member

daxgames commented Nov 7, 2020

or maybe not.

@daxgames
Copy link
Member

daxgames commented Nov 7, 2020

Looks like it removes all 2 character aliases from the file.

@chrisant996
Copy link
Contributor

Looks like it removes all 2 character aliases from the file.

Oh, probably something is using the alias name in a regular expression to remove it, but neglected to escape the alias name. And then the . characters are interpreted as "match any character" by the regular expression.

For example, probably alias .d=abc will remove all two character aliases where the second character is d.

@daxgames daxgames mentioned this issue Dec 23, 2020
@daxgames
Copy link
Member

Fixed in #2449

@chrisant996
Copy link
Contributor

Oh, it's using findstr. FWIW then, an even easier and more thorough fix could be to use the /l flag (and the /b flag) to disable regex evaluation, since it's trying to do a literal search.

@daxgames
Copy link
Member

@chrisant996 My fix works, yours is better and may go in a future change.

Did you see the bug report on 1.3.17 release 1ith Clink 1.1.10 reg clink settings and history? Not really a bug but if you have suggestions on how to best handle from Cmder side it would be helpful.

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

4 participants
@xy2z @daxgames @chrisant996 and others