mastodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance, open to everyone, but mainly English and French speaking.

Administered by:

Server stats:

737
active users

#zshell

0 posts0 participants0 posts today
Continued thread

I add a zsh `custom` folder inside my versioned .config repo for aliases, functions, and themes:

`mkdir -p "$HOME/.config/zsh/custom"`

Copy folder structure and examples, `cd "$HOME/.config/zsh" && cp -r ~/.oh-my-zsh/custom/ ./custom`

Edit `zshrc` to set `ZSH_CUSTOM`.

To customise the prompt with a timestamp and git info, I create a theme in: `~/.oh-my-zsh/custom/themes/di.zsh-theme`

#zsh #zshell #DiSetsUpAMacBook 18/n

Continued thread

For zsh, I group completion cache files into a subdirectory to minimise the loose collection of stray files in my home directory. I edit `~/.config/zsh/zshrc` and add comp dump file details before `source $ZSH/oh-my-zsh.sh`.

I also move `zsh_history` (which is not really config) out of the config directory. Edit `~/.config/zsh/zshrc` and add details before `source $ZSH/oh-my-zsh.sh`.

If I decide to delete `~/.cache` on a whim to free up space on my hard drive, I'll lose my whole zsh history. That's ok! If I miss it, that's what backups are for.

Close all existing tabs and start a new shell so I don't accidentally make more files in old locations. Delete any stray `.zcompdump-*` or `.zsh_history` files already created.

#zsh #zshell #DiSetsUpAMacBook 17/n

Continued thread

I set up zsh with Oh My Zsh.

First, I make a directory for zsh config files in the git tracked .config dir:

`mkdir -p ~/.config/zsh`

I create a `~/.config/zsh/.zshenv` file and in it I set `ZDOTDIR` to the new config dir:

`ZDOTDIR="$HOME/.config/zsh"`

I create symlinks for the `.zshenv` file (which will be processed before other zsh files) and zshrc:

`ln -s ~/.config/zsh/zshenv ~/.zshenv`

`cd ~/.config/zsh/ && ln -s zshrc .zshrc`

#zsh #zshell #DiSetsUpAMacBook 16/n

One of the things that always strikes me as kind of wierd about the current state of immutable distros; is how things like cli shells factor in.

Like it doesn't square right to me, to entertain installing #zshell via distrobox or flathub, and I generally WANT it as my default shell.

All the os-tree documentation in #Fedora and all the transactional-update documentation in #OpenSuse seems to imply your recklessly breaking the spirit of the immutable distro by adding it to the base system.

This has more or less lead me to believe that immutable linux distros are not for me, despite not minding flatpak much at all these days.

Maybe im missing something? #zsh #ImmutableOS #immutable #immutabledistro #distrobox #flatpak #linux #floss

Another #OpenSource project pulls back from active #development:

#Powerlevel10k (a theme engine for the #zsh command-line #shell) author Roman Perepelitsa has placed the project on "life support” due to the high cost and mental strain of addressing personalized assistance requests: github.com/romkatv/powerlevel1

GitHubProject on life support · Issue #2690 · romkatv/powerlevel10kBy lasseoe

Hey, zsh and iTerm2 users! Wanna jump between words on your terminal? Add this snippet into your ~/.zshrc file, and reload the shell. This allows you to use Option + Left/Right arrows to move one word forward or backward.

bindkey "[D" backward-word
bindkey "[C" forward-word
bindkey "^[a" begining-of-line
bindkey "^[e" end-of-line

#zsh#zshell#macos
Replied in thread