In a bash script, driving the login or unlock command while capturing the session requires a subshell, e.g. after a login with an api key:
session="$(bw unlock --raw)"
Naturally, any code that tests if the output is a terminal will fail, and ansi color escapes are suppressed.
All of my attempts at other ways to invoke this command (e.g. redirects, pipes, etc) all produce the same result, but perhaps I’ve missed some trick.
For security, I will not use an env var or file to provide the password: I want a way to leverage the CLI’s input mechanism while retaining colored prompts.
The primary use case for this feature is simply to match the style used by a script that itself produces colored output (my current case), but I suspect there are others.
I very much appreciate how much is on your plate (30+ years as a developer), and that this is a low priority request, but.. thanks for your conideration!