f8c1cb1...
by
Clement Lefebvre <email address hidden>
8.5.8
a0e615e...
by
Clement Lefebvre <email address hidden>
Fix apt search
Broken in 8.5.7.
columns is expected as a string.
b89bfe4...
by
Clement Lefebvre <email address hidden>
8.5.7
e81e4e8...
by
Clement Lefebvre <email address hidden>
Usage: Update wording
72bb201...
by
Clement Lefebvre <email address hidden>
Usage: Explain the difference between apt and upstream apt
4a4184f...
by
Clement Lefebvre <email address hidden>
Code: Make tuple more explicit
8119443...
by
terminalforlife <email address hidden>
Improve `Usage()` & use `pass` with an exception
* The code and output for Usage() has been improved
- Reworded to more clearly or accurately describe some arguments
- Reworded in order to display the text properly in <= 80 columns
- The code uses a triple-quote to make things far easier to work with
- The output now leads with '/usr/local/bin/apt' to avoid confusion
* Exceptions will now correctly `pass`, rather than `print()` nothing
Some of the wording of the descriptions for the arguments in `Usage()`
are inaccurate, but I appreciate that some concessions had to be made
in order to be easier to understand for those inexperienced with Linux
or the packaging system. I followed suit as much as I felt reasonable.
3e2a83c...
by
terminalforlife <email address hidden>
Allow simulate flags to get through
Prior to this commit, non of the simulation flags will have worked, -
because there was no logic in place to catch them. This is frustrating
when you need to simulate.
dcf4fe2...
by
terminalforlife <email address hidden>
Optimize & clean up handling of terminal size
I've learned using `os.popen()` is usually discouraged, these days. The
`subprocess.check_output()` method is best used in older Python 3.*
versions (e.g., 3.6). Or, if you're in a newer version of Python
(e.g., 3.8), `subprocess.run(..., capture_output = True)`, which
returns a useful class allowing you to access different elements of the
response.
Regardless, running a shell command within Python strikes me as a last
resort affair, else the language is likely the wrong tool for the job.
Therefore, using the `shutil.get_terminal_size()` method seems like a
better course of action, because it provides exactly what is wanted
here, including a default (`fallback`) value.
1955c32...
by
Clement Lefebvre <email address hidden>