Skip to content

load(io.popen('oh-my-posh init cmd'):read("*a")) returns nil #4713

Discussion options

You must be logged in to vote

Ah thank you! I found out that it's because I have a script that echoes to the terminal every time a new instance is created. So it was attempting to parse the string Loaded aliases... as lua code.

I found out by simply printing out the return value of load (it shows the error too - i didn't know Lua returned errors like that): print(load(io.popen('oh-my-posh init cmd'):read('*a'))) showed:

nil     [string "Loaded aliases...."]:1: syntax error near 'aliases'

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@BeatsuDev
Comment options

@JanDeDobbeleer
Comment options

@BeatsuDev
Comment options

Answer selected by BeatsuDev
@jeremyj563
Comment options

Comment options

You must be logged in to vote
1 reply
@JanDeDobbeleer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
4 participants
Converted from issue

This discussion was converted from issue #4712 on February 25, 2024 17:52.