summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAyush Agarwal <ayush@fastmail.in>2021-09-20 00:55:56 +0530
committerAyush Agarwal <ayush@fastmail.in>2021-09-20 00:55:56 +0530
commite4f3c5a6d1ac2bcba5c28b4dd9a46a5b6a08954b (patch)
treef5334a072874b8b8a4981c2f35c5e09eca52ef1c /README.md
parentcbb35e4305cfd62d7d0bbc9d443fb1f96c21a2de (diff)
fix the backend validation logicv0.5.1
This might be a hack but I had to figure out how to work with the following - if no backend choice is given, assume bemenu - if the user sets the TESSEN_BACKEND env var, use that - if the user provides the `-b` flag at runtime, use that above all else I've already assumed bemenu by default in the list of global variables. However, figuring out how to prefer the command line flag over the env var was a bit tricky I guess. I changed the `validate_backend` function to always assign both backend global variables as readonly and this function is always called if the user provides a `-b` flag at runtime. If he doesn't though, I can safely use the unset condition on the BACKEND_OPTS variable, instead of BACKEND, since it has not been assigned anyways. If it can be unset, it means it hasn't been made readonly, which means `-b` wasn't provided. We can call the `validate_backend` function to do what we wanted.
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions