mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
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.
This commit is contained in:
parent
3d4d0a1243
commit
6acf03d9a8
Notes:
sideshowbarker
2024-07-17 07:20:49 +09:00
Author: https://github.com/fdellwing Commit: https://github.com/SerenityOS/serenity/commit/6acf03d9a8 Pull-request: https://github.com/SerenityOS/serenity/pull/18467 Reviewed-by: https://github.com/emanuele6 Reviewed-by: https://github.com/gmta ✅ Reviewed-by: https://github.com/nico Reviewed-by: https://github.com/timschumi
3 changed files with 51 additions and 0 deletions
1
Ports/zsh/.gitignore
vendored
Normal file
1
Ports/zsh/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!zshrc
|
|
@ -13,3 +13,7 @@ pre_configure() {
|
|||
post_configure() {
|
||||
run_replace_in_file "s/define HAVE_PRCTL 1/undef HAVE_PRCTL/" config.h
|
||||
}
|
||||
|
||||
post_install() {
|
||||
cp "${PORT_META_DIR}/zshrc" "${SERENITY_INSTALL_ROOT}/etc/"
|
||||
}
|
||||
|
|
46
Ports/zsh/zshrc
Normal file
46
Ports/zsh/zshrc
Normal file
|
@ -0,0 +1,46 @@
|
|||
###############
|
||||
# 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%# '
|
Loading…
Reference in a new issue