base: fix shell configuration, increase $HISTSIZE, and change history alias so it displays full history
"set -A" options are for ksh only
This commit is contained in:
parent
4506c835c5
commit
93f21a947c
|
@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Fixed
|
||||
|
||||
- base: fix shell configuration, increase $HISTSIZE, and change history alias so it displays full history
|
||||
|
||||
### Removed
|
||||
|
||||
## [21.12] - 2021-12-17
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
alias vi='vim'
|
||||
sudo() { if [[ $# == "1" ]] && [[ $1 == "su" ]]; then command sudo -i; else command sudo "$@"; fi }
|
||||
alias history="fc -l 0"
|
||||
|
||||
##
|
||||
# Caracterisation du shell
|
||||
|
@ -15,3 +16,30 @@ bind '^[Oc'=forward-word
|
|||
bind '^[Od'=backward-word
|
||||
bind '^[^[[C'=forward-word
|
||||
bind '^[^[[D'=backward-word
|
||||
|
||||
set -A complete_kill_1 -- -9 -HUP -INFO -KILL -TERM
|
||||
if [ $? = 0 ]; then
|
||||
set -A complete_vmctl -- console load reload start stop reset status
|
||||
set -A complete_vmctl_2 -- $(vmctl status | awk '!/NAME/{print $NF}')
|
||||
fi
|
||||
if [ -d ~/.password-store ]; then
|
||||
PASS_LIST=$(
|
||||
cd ~/.password-store
|
||||
find . -type f -name \*.gpg | sed 's/^\.\///' | sed 's/\.gpg$//g'
|
||||
)
|
||||
|
||||
set -A complete_pass -- $PASS_LIST -c generate edit insert git
|
||||
set -A complete_pass_2 -- $PASS_LIST push
|
||||
fi
|
||||
PKG_LIST=$(ls -1 /var/db/pkg)
|
||||
set -A complete_pkg_delete -- $PKG_LIST
|
||||
set -A complete_pkg_info -- $PKG_LIST
|
||||
set -A complete_rcctl_1 -- disable enable get ls order set reload check restart stop start
|
||||
set -A complete_rcctl_2 -- $(ls /etc/rc.d)
|
||||
set -A complete_signify_1 -- -C -G -S -V
|
||||
set -A complete_signify_2 -- -q -p -x -c -m -t -z
|
||||
set -A complete_signify_3 -- -p -x -c -m -t -z
|
||||
set -A complete_make_1 -- install clean repackage reinstall
|
||||
set -A complete_gpg2 -- --refresh --receive-keys --armor --clearsign --sign --list-key --decrypt --verify --detach-sig
|
||||
set -A complete_git -- pull push mpull mpush status clone branch add rm checkout fetch show tag commit
|
||||
set -A complete_ifconfig_1 -- $(ifconfig | grep ^[a-z] | cut -d: -f1)
|
||||
|
|
|
@ -8,7 +8,7 @@ export LANG="en_US.UTF-8"
|
|||
export LC_ALL="en_US.UTF-8"
|
||||
export PS1="\u@\h:\w\\$ "
|
||||
HISTFILE=$HOME/.histfile
|
||||
export HISTSIZE=10000
|
||||
export HISTSIZE=100000
|
||||
export HISTCONTROL='ignoredups:ignorespace'
|
||||
export TMOUT=36000
|
||||
export PAGER=less
|
||||
|
@ -27,32 +27,3 @@ case "$-" in
|
|||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
PKG_LIST=$(ls -1 /var/db/pkg)
|
||||
|
||||
set -A complete_kill_1 -- -9 -HUP -INFO -KILL -TERM
|
||||
pgrep -q vmd
|
||||
if [ $? = 0 ]; then
|
||||
set -A complete_vmctl -- console load reload start stop reset status
|
||||
set -A complete_vmctl_2 -- $(vmctl status | awk '!/NAME/{print $NF}')
|
||||
fi
|
||||
if [ -d ~/.password-store ]; then
|
||||
PASS_LIST=$(
|
||||
cd ~/.password-store
|
||||
find . -type f -name \*.gpg | sed 's/^\.\///' | sed 's/\.gpg$//g'
|
||||
)
|
||||
|
||||
set -A complete_pass -- $PASS_LIST -c generate edit insert git
|
||||
set -A complete_pass_2 -- $PASS_LIST push
|
||||
fi
|
||||
set -A complete_pkg_delete -- $PKG_LIST
|
||||
set -A complete_pkg_info -- $PKG_LIST
|
||||
set -A complete_rcctl_1 -- disable enable get ls order set reload check restart stop start
|
||||
set -A complete_rcctl_2 -- $(ls /etc/rc.d)
|
||||
set -A complete_signify_1 -- -C -G -S -V
|
||||
set -A complete_signify_2 -- -q -p -x -c -m -t -z
|
||||
set -A complete_signify_3 -- -p -x -c -m -t -z
|
||||
set -A complete_make_1 -- install clean repackage reinstall
|
||||
set -A complete_gpg2 -- --refresh --receive-keys --armor --clearsign --sign --list-key --decrypt --verify --detach-sig
|
||||
set -A complete_git -- pull push mpull mpush status clone branch add rm checkout fetch show tag commit
|
||||
set -A complete_ifconfig_1 -- $(ifconfig | grep ^[a-z] | cut -d: -f1)
|
||||
|
|
Loading…
Reference in a new issue