Some more zsh configuration proposed changes:
1. `bindkey '^I' complete-word`: remaps tab key to only suggest completion, not also expand globs. Without this, ls \*\<tab\>, for example, would instantly expand to all files in the current directory, or $HOME would expand to /home/user. This instead would make zsh tab completion behave more like default bash.
2. `setopt hist_verify`: whenever a command has some history expansion, it doesn't instantly run the command, but expands it before. This would be safer, as it allows users to actually see what their actual command is. Counterpoint: for expert users now !!, for example, requires pressing enter twice, but overall i think this slight inconvenience might be worth actually knowing what is going to run before executing it.
3. `setopt auto_cd` : this allows changing directory without typing cd. Instead of 'cd ./project' now one can do './project'. This do would probably be convenient to have enabled by default, and I could not think of big enough cons to not have it.
4. `ZLE_REMOVE_SUFFIX_CHARS=$' \t\n;&|'` and `ZLE_SPACE_SUFFIX_CHARS=$';&|'`: this forces zsh completion to add spaces after completions, instead of removing them when typing some chars, such as ;, &, |. To make an example: typing 'ls /tm\<tab\>\` will result in ls /tmp/. Now if & or | or ; is typed instantly after, zsh will just keep those attached (aka 'ls /tmp&'), which is horrendous to read. With this change, instead, it would add a space in between and thus completing to 'ls /tmp &'. See [Screencast_20260405_153419.webm](/uploads/6ea8ff69758adbb59ea22caecb2599e7/Screencast_20260405_153419.webm)
Also: I have taken the liberty to format the file a little, and move some lines around, so that logically connected configs are close to each other, making the config file easier to read.
P.S: Zsh is a good shell, but damn its defaults are atrocious!
Is a better maintained Userspace Alternative to the Kernel Virtual terminals with better security, mouse/touchpad support, scrolling, multi seat, not kernel panicing but restarting, hardware acceleration etc.
Signed-off-by: Hadi Chokr <hadichokr@icloud.com>
This adds and configures the following packages:
* `zsh-history-substring-search` provides a substring search through history and suggests possible arguments
* `zsh-autosuggestions` gives suggestions during typing
* `zsh-syntax-highlighting` colors commands based on their syntax
Resolves#521
If running a file/script/binary in the CLI without the executable bit set, it will fail with "permission denied", which isn't clear about what happened and is annoying. Instead, have a small stub that asks the user if they want to make the file executable and run it, saving time and keypresses while being clearer about what is happening.
Metadata is data; losing it by accident when using common command-line
tools is data loss.
Let's harden against this by aliasing `mv` and `rsync` to versions of
themselves with metadata-preserving arguments invoked by default,
similar to what we do for `grep` to enable colorized output.
Allows us to easily assign systemwide default applications for KDE Linux. This is required for Package Compatibility Helper to work, and saves us editing the packaged kde-mimeapps.list in place to set Firefox as the default web browser.
See https://specifications.freedesktop.org/mime-apps/latest/file.html for the lookup order.
Adds a nice asterisk display when you type your password into sudo.
This might be controversial, but I think this is a useful change because:
- it doesn't undermine security in any realistic way,
- it's slightly more user friendly in general for everyone, and aligns with the expected UX of a standard password entry box,
- it removes a UX hiccup for new users, many of which I have seen get confused about why their password "doesn't type".
If we're striving for mass adoption, this is the type of thing that should be put under the microscope.
Ubuntu does this (unintentionally, since they use sudo-rs), and Zorin OS intentionally does this as they are quite unique in trying to create an end-to-end intuitive UX for your average non-tech savvy person, which is something we should strive to do.
It enables:
- Mounting disc images without burning them to physical media.
- Using image formats that "mount" usually can’t handle well, such as multi-session or mixed audio/data discs.
- Installing or running old games that expect an optical drive.
- Working with non-ISO images like .bin/.cue, .nrg, and .ccd.
- Creating a blank virtual disc for CD/DVD burning software.
Some GUI applications such as Dolphin GIT integration ask for SSH
password during use. This let's those applications know
what our GUI tool for it is.
If this is not set, those applications may fail and expect the
user to enter the SSH key through a terminal prompt, which
is not available in GUI applications.