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

Missing features if script is using log redirection #100

Closed
john-f-chamberlain opened this issue Feb 15, 2022 · 3 comments
Closed

Missing features if script is using log redirection #100

john-f-chamberlain opened this issue Feb 15, 2022 · 3 comments

Comments

@john-f-chamberlain
Copy link

john-f-chamberlain commented Feb 15, 2022

I use the following in many of my scripts to automatically log output to a file:

exec &> >(tee -a "output.log")

However, if I have this line in my file, many of the features of bashsupport pro are missing below it.
For example:

#!/bin/bash

######################################
# Setup Automagic Logging
exec &> >( tee -a "output.log" )

######################################
# Function Declarations
function test_function() {
  echo "This function does test function things..."
}

test_function;

With line 5 commented out, the "jump to declaration" feature works, however with it uncommented jump to declaration doesn't work and all of the function names are no longer color coded properly.

@jansorg
Copy link
Contributor

jansorg commented Feb 15, 2022

@john-f-chamberlain That's a clever Bash redirect 😄
Thanks for reporting! I've fixed this for the next update. It's a parsing bug around &> followed by a process substitution, which wasn't properly supported at this place.

@jansorg
Copy link
Contributor

jansorg commented Feb 18, 2022

Version 2.1.5 fixes this bug and is now available. Thanks!

@jansorg jansorg closed this as completed Feb 18, 2022
@john-f-chamberlain
Copy link
Author

Thank you! I've confirmed your new release has fixed the issue! :)

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