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

almostontop automatically substitutes variables #5

Closed
avamsi opened this issue Jun 11, 2019 · 5 comments
Closed

almostontop automatically substitutes variables #5

avamsi opened this issue Jun 11, 2019 · 5 comments

Comments

@avamsi
Copy link

avamsi commented Jun 11, 2019

For example, $ echo $EDITOR without almostontop just gets executed as $ echo $EDITOR

But with almostontop, it gets replaced with $ echo ~/bin/micro

@Valiev
Copy link
Owner

Valiev commented Jun 11, 2019

Thanks for the issue. I need some time to figure it out, whether it a feature or a bug. 😂

@avamsi
Copy link
Author

avamsi commented Jun 12, 2019

Sure, thanks.

To add a bit more context to help you with your decision:

It's fine when almostontop replaces commands like $ sudo !! with $ sudo #previous_command (this is the happy case, maybe even a feature if you will)

But the problem is when it replaces commands like

$ #some_private_util mkdir #some_path%ttl=1d

with

$ #some_private_util mkdir #some_path[#current_time]tl=1d

In this command "%" after the path is treated as a delimiter followed by args (like ttl = 1d in this example) and almostontop breaks that by replacing %t with #current_time -- this, I would call a bug -- at least without a way to suppress this behavior and keep almostontop on.

Valiev added a commit that referenced this issue Jun 13, 2019
Valiev added a commit that referenced this issue Jun 13, 2019
@Valiev
Copy link
Owner

Valiev commented Jun 13, 2019

@avamsi , should be fixed now. Please check out the new version.

@Valiev
Copy link
Owner

Valiev commented Jun 13, 2019

could be easily checked with echo $? command

@avamsi
Copy link
Author

avamsi commented Jun 13, 2019

That was pretty quick! Thanks @Valiev!

@avamsi avamsi closed this as completed Jun 13, 2019
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