Though I noticed in another post that someone had gotten most of the features in zsh working, there were some features at the time that were not. Further it may not always work if a system update modified dietpi’s structure.
Though I use zsh in almost every environment, and it would be nice to get it working solidly in dietpi, however if that is not really something that will be maintained, are there alternatives that basically accomplish the same thing and would be more reliable that zsh on this system?
Specifically:
command completion
keyup through history filtered on the characters that are already in the prompt
color notification if the command exists or not
modifying the prompt color and prompt itself, there are times where I want to know which system I’m logged into in which terminal, I use that often.
showing the invokation time of when the was entered on the right hand side or any RHS prompt options.
With the assumption per the close of the last comment that none of the maintainers use zsh, yet all of you are of course serious shell programmers and curators, perhaps you use other tools that already accomplish the same purpose.
As always, thanks for your efforts on this great project.
don’t think we will implement zsh in near future because we have a single developer on this project and simple not the manpower to maintain such thinks. But @MichaIng probably has own thougts
Are there better alternatives to accomplish any or all of the same things that currently work? I’m not tied to zsh per-se just the things that it makes readily available to users without the deepest knowledge.
An adapted variant of this login script is needed. It does not necessarily need to contain all steps/features of the original one, especially since e.g. dietpi-globals AFAIK are not supported by zsh, at least since its arrays start with index 1 (instead of 0), right? A minimal version which at least runs the dietpi-login scripts and adds the aliases/shortcuts would be great, like proposed for fish here: Add dietpi aliases to Fish and change the Fish greeting by Possibly-Matt · Pull Request #5211 · MichaIng/DietPi · GitHub
Indeed I won’t find time for this soon, and there are higher priority tasks. But I’ll support anyone who starts working on it.
Command completion is already present in bash (via bash-completion) and the command prompt can be modified via $PS1 variable.
How does this color notification work, i.e. how is it better than the “command does not exist” error message?
The keyup filter sounds like very reasonable feature indeed. Not sure if any such extension exists for bash.
I think there is a word missing in your last point. Do you mean a timestamp for entered commands? That would be possible via $PS1 as well. Well, not 100% that, but you can add a timestamp for when the command prompt appeared.
I do not know other shells well, so not sure which others offer these features OOTB, but all other shells have the same problem that they do not run our login script, and in cases do not (fully) support the used bash syntax either.
notice the “l” is yellow and the “pw” is orange, however if I add a “d” for pwd it will change. This is useful if you have a series of commands that are a bit longer.
Regarding why…
An example, I often “namespace” commands that run on different systems or are obscure or don’t need to be loaded in zsh or bash unless there is a specific reason. Also so I can focus on learning the core of work that I perform.
For example, I use yabai on macos, however I really do need to carry those commands everywhere so I have a load:yabai command which will add all the commands into the shell, though they normally are not loaded.
after that yabi:reinstall, or yabai:update-hash etc… will work. there are often commands I may not even want someone sitting at my office to know how to easily do, that I have shortcuts for that are not autoloaded.
I’ve had someone accidentally destroy a some very complex work on a project with some long git rebasing aliases that had a short acronym, it’s now not loaded unless I am sure I want those in shell, and then normally I boot them out of memory with exec bash -l aliased to reload:commands.
Lastly on the right are the timestamps. When the last command is done and it’s ready for input it logs the time. Some people keep it moving and show the time the command was run. However I find this is enough for the critical needs I use it for rarely that can be a real help. It gives me a close enough widow to search logs.