zsh seems to have much better usability, a much better completion features and other features. See demonstration here:
2 Packages, ~ 5 MB.
breaking bash scripts: each script nowadays has a shebang in its first line such as for example /usr/sbin/apparmor-info is a bash script, its first line is #!/bin/bash. Therefore the script will still run under bash, not zsh.
changing back default shell to bash by the user will still be simple
it will be trivial to start bash from zsh by typing command bash
Other than above minor comments… Excellent! Excited to see this being added to Whonix. The command completion is just on steroids. Easier than reading man pages. Makes less common command line parameters much more accessible.
Showing the exit code seems highly useful. Instead of telling users in documentation to append ; echo $? to commands or echo $?… What do you think about always showing the exit code? If zero, a (0). Probably in a green color. Other colors for other numbers.
However, showing the exit code in the terminal could have some unintended side effects? Such as… When the user copy/pasted the log, the reader (other forums etc.) might be confused?
The unix way is to be silent when the exit code is 0, and I think that if there is an exit code worth checking is the one that is >0, because than the brain is just warned to look at the exit code if an error ocurrs.
I found this but it only works to print on the line before and not on the prompt.
setopt PRINT_EXIT_VALUE seems to be the better to print the line before:
[workstation user ~/git/whonix-shell(main)]% zsh
[workstation user ~/git/whonix-shell(main)]% a
zsh: command not found: a
zsh: exit 127 a
[workstation user ~/git/whonix-shell(main)]%
but still doesn’t print exit code 0 because it is not relevant?
not with setopt PRINT_EXIT_VAUE example from above, it already has the text zsh: exit 127 command.
It may take oneline more on errors but may be better?
Please feel free to proceed with integrating this by default in Kicksecure / Whonix.
Ideally using ZDOTDIR environment variable if possible. “Stealing” (overwriting) config files from Debian’s zsh (or any other) package using config-package-dev should be avoided if somehow possible.
Looks really nice.
Yeah, I guess so. No strong opinion here.
I am looking at this from a different perspective. More like: I always want to see some result even if it means “OK” because otherwise I question if the mechanism to show the error itself is broken. Maybe very likely unlikely here. These fail-safe considerations of mine are probably less important than the usability impact of only showing exit codes on failure.
Or to find out about unexpected exit codes. (Zero when it should be non-zero.)
If nobody else has an opinion here, probably best to only show the non-zero exit codes by default.
/etc/X11/Xsession.d + /etc/profile.d
Similar to other examples in Whonix source code.
…unless there are other solutions that I am not aware of. Distributions setting global environment variables is messy. There are probably no better solutions.
dist stands for distribution. What distribution? Kicksecure and Whonix. I couldn’t come up with a better common name. That’s where the “dist” is coming from. Kept it open so potentially other distributions could fork it so neither Kicksecure nor Whonix are inside the package or folder name if not required.