ladybird/Ports/zsh/zshrc
Fabian Dellwing 6acf03d9a8 Ports: Add default zshrc
Previosly we had a very messed up PS1 as the Shell PROMPT is not
unset correctly.

We now provide a default `zshrc` file for the system that uses
sane values for basic categories like aliases, autocompletion and
history management to make the port more usable. It also forces
the prompt to be the default zsh one.
2023-04-25 20:48:51 +02:00

47 lines
952 B
Bash

###############
# Completions #
###############
# Completions
autoload -U compinit
compinit -C
# Arrow key menu for completions
zstyle ':completion:*' menu select
# Case-insensitive (all),partial-word and then substring completion
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
###########
# Aliases #
###########
# Set up aliases
alias ll='ls -l'
# Autocomplete command line switches for aliases
setopt completealiases
###########
# History #
###########
# number of lines kept in history
HISTSIZE=1000
# number of lines saved in the history after logout
SAVEHIST=1000
# location of history
HISTFILE=~/.zsh_history
# append command to history file once executed
setopt inc_append_history
# only show past commands that include the current input
bindkey "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward
########
# Misc #
########
# Set prompt
PROMPT='%m%# '