From c69f75d08a07b8101bd0cc9988cb2bec6b98bec2 Mon Sep 17 00:00:00 2001 From: HerrCraziDev Date: Mon, 25 Sep 2023 17:33:56 +0200 Subject: [PATCH 1/9] update, wsl serial console init, basic vimrc --- .aliases | 4 ++-- .termrc | 56 +++++++++++++++++++++++++++++++++++++++++++------ .vimrc | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ .zshrc | 4 ++++ tmux/.tmux.conf | 3 ++- 5 files changed, 113 insertions(+), 9 deletions(-) create mode 100644 .vimrc diff --git a/.aliases b/.aliases index 2d6a7d8..fdf81c2 100644 --- a/.aliases +++ b/.aliases @@ -26,7 +26,7 @@ alias tmr='tmux attach' alias ll='ls -lah --color=auto' alias reload='source ~/.termrc' -alias ssj="ssh -J pi@bst1.chenco.dev" +alias ssj="ssh -J herrcrazi@lan1.chenco.dev" #alias mc-install-plugin='echo "Installing $2"; echo "Done !"' alias cls='lxc ls -c ns4DSP' @@ -38,6 +38,6 @@ alias zfs='sudo zfs' alias zls='sudo zfs list' sm() { - tmux new-window -n serial:$(basename ${@:-1}) sudo picocom --baud 921600 --parity n --databits 8 --stopbits 1 --flow n --escape z $@ + tmux new-window -n serial:$(basename ${@:-1}) sudo picocom --logfile $SERIAL_LOGS/serial-$(basename ${@:-1})-$(ls $SERIAL_LOGS/serial-*.log 2> /dev/null | wc -l).log --baud 921600 --parity n --databits 8 --stopbits 1 --flow n --escape z $@ } diff --git a/.termrc b/.termrc index 989ecae..d9865d4 100644 --- a/.termrc +++ b/.termrc @@ -7,6 +7,12 @@ if [ -e $HOME/.tmux/.tmux-aliases ] ; then source $HOME/.tmux/.tmux-aliases fi +if [ -n "$WSLENV" ] ; then + HRNX_TMUX_SESSIONNAME="wsl" +else + HRNX_TMUX_SESSIONNAME="main" +fi + # Fix linker errors with gtk3 -- removed since I nuked gtk-nocsd #export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 @@ -15,6 +21,11 @@ echo -e '\e[34m [termrc] Config reloaded\e[0m' # Add Rust crates to path #export PATH=$PATH:$HOME/.cargo/bin +# Add node global modules to PATH +if nodepath=$(npm root -g); then + export PATH=$PATH:$nodepath +fi + # Usual env vars export EDITOR=/usr/bin/vim export LANG="en_US.UTF-8" @@ -37,15 +48,48 @@ if [ -n "$WSLENV" ] ; then # Connect serial console port if found if [ -z "$_SERIAL_INIT" ] ; then source "$HOME/.usbipd" + + # Connect serial console ports echo "Connecting serial port... (device $USB_SERIAL_HWID)" - usbipd.exe wsl attach --hardware-id $USB_SERIAL_HWID - if [ $? -eq 0 ]; then - echo "Serial port connected" - usbipd.exe wsl list - export _SERIAL_INIT=1 + + bus_ids=$( usbipd.exe wsl list 2> /dev/null | grep "0403:6001" ) + + if [ -n "$bus_ids" ] ; then + echo $bus_ids + IFS=$' \t\n' + bus_ids=$( tr -s ' ' <<< $bus_ids | cut -d ' ' -f1 | tr '\n' ' ' ) + + for bus_id in $=bus_ids ; do + usbipd.exe wsl attach --busid $bus_id 2> /dev/null + if [ $? -eq 0 ]; then + echo "Serial port $bus_id connected" + export _SERIAL_INIT=$(($_SERIAL_INIT+1)) + else + echo "Unable to connect serial port (device $USB_SERIAL_HWID, bus $bus_id)" + fi + done + + usbipd.exe wsl list 2> /dev/null else - echo "Unable to connect serial port (device $USB_SERIAL_HWID)" + echo "No serial port found matching device type $USB_SERIAL_HWID" + fi + + # Configure serial logs + if [ ! -d $SERIAL_LOGS ] ; then + if mkdir -p $SERIAL_LOGS; then echo "Serial logpath created at $SERIAL_LOGS" + else echo "Unable to create $SERIAL_LOGS"; fi + else + echo "Serial logs will be written to $SERIAL_LOGS" fi fi fi +# Automatically creates and attach a 'main' tmux session. If already created, +# attach in a new window instead. If running from tmux, does nothing. +if [ -z "$TMUX" ] ; then + #if [ tmux ls -F "#S" | grep $HRNX_TMUX_SESSIONNAME ] ; then + + tmux new-session -A -s $HRNX_TMUX_SESSIONNAME +fi + + diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..a54a2e3 --- /dev/null +++ b/.vimrc @@ -0,0 +1,55 @@ +set history=500 + +" Filetype plugins +filetype plugin on +filetype indent on + +" Auto read externally modified files +set autoread +au FocusGained,BufEnter * silent! checktime + +" :W sudo saves the file +" (useful for handling the permission-denied error) +command! W execute 'w !sudo tee % > /dev/null' edit! + +" Regexes, search +set magic +set incsearch +set showmatch +set smartcase +set ignorecase +set hlsearch + +" Line numbers +set number + +" Ruler +set ruler + +" Colors +syntax enable +set t_Co=256 + +" Default filetypes +set ffs=unix,dos,mac + + +" Tabs and indentation +"""""""""""""""""""""" + +" Be smart when using tabs ;) +set smarttab + +" 1 tab == 4 spaces +set shiftwidth=4 +set tabstop=4 + +" Linebreak on 500 characters +set lbr +set tw=500 + +set ai "Auto indent +set si "Smart indent +set wrap "Wrap lines + + diff --git a/.zshrc b/.zshrc index eab7f7f..d197da5 100644 --- a/.zshrc +++ b/.zshrc @@ -65,3 +65,7 @@ SAVEHIST=100000 setopt autocd beep notify bindkey -e # End of lines configured by zsh-newuser-install + +# Disable zsh globbing error messages, leave it to the called program +setopt +o nomatch + diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 0ed2375..fa49a54 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -22,6 +22,7 @@ bind Enter copy-mode bind Escape copy-mode # Copy mode +set -g mode-keys vi # set vim keys bind C-v paste-buffer bind -T copy-mode-vi Enter send -X copy-selection-no-clear \; send -X copy-pipe-and-cancel "xclip -i -sel c" \; display " [tmux] copied!" bind -T copy-mode-vi C-c send -X copy-selection-no-clear \; send -X copy-pipe-and-cancel "xclip -i -sel c" \; display " [tmux] copied!" @@ -36,7 +37,7 @@ bind -T copy-mode-vi Escape send -X cancel # Window actions # bind y rename-window -bind r source-file ~/.tmux.conf; display " [tmux] ♦ Configuration reloaded from .tmux.conf" +bind r source-file ~/.tmux.conf #; display " [tmux] ♦ Configuration reloaded from .tmux.conf" # Colors set -g display-panes-active-colour colour71 From aa422b9bec1789827e0f7c5fe20ebd2f23edb6e1 Mon Sep 17 00:00:00 2001 From: HerrCraziDev Date: Thu, 25 Jan 2024 13:55:17 +0100 Subject: [PATCH 2/9] serial console in interactive mode, ssh aliases --- .aliases | 16 ++++++++++++++++ .termrc | 9 +++++++++ tmux/.tmux.conf | 3 ++- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/.aliases b/.aliases index fdf81c2..09517fb 100644 --- a/.aliases +++ b/.aliases @@ -41,3 +41,19 @@ sm() { tmux new-window -n serial:$(basename ${@:-1}) sudo picocom --logfile $SERIAL_LOGS/serial-$(basename ${@:-1})-$(ls $SERIAL_LOGS/serial-*.log 2> /dev/null | wc -l).log --baud 921600 --parity n --databits 8 --stopbits 1 --flow n --escape z $@ } +smi() { + tmux rename-window "serial:$(basename ${@:-1})" + sudo picocom --logfile $SERIAL_LOGS/serial-$(basename ${@:-1})-$(ls $SERIAL_LOGS/serial-*.log 2> /dev/null | wc -l).log --baud 921600 --parity n --databits 8 --stopbits 1 --flow n --escape z $@ +} + +mgnt() { + echo $1 + sshpass -p administrator ssh administrator@$1 +} + +sumgnt() { + #echo root@$1 + sshpass -p ekitool ssh root@$1 "${@:2}" +} + +alias shmgnt="sshpass -p ekitool ssh" diff --git a/.termrc b/.termrc index d9865d4..7888b4c 100644 --- a/.termrc +++ b/.termrc @@ -45,6 +45,9 @@ if [ -n "$WSLENV" ] ; then # Enable entr workaround for incomplete inotify support on WSL export ENTR_INOTIFY_WORKAROUND=1 + # Re-init serial + reinit() (unset _SERIAL_INIT; reload) + # Connect serial console port if found if [ -z "$_SERIAL_INIT" ] ; then source "$HOME/.usbipd" @@ -92,4 +95,10 @@ if [ -z "$TMUX" ] ; then tmux new-session -A -s $HRNX_TMUX_SESSIONNAME fi +# Env for 'mgnt toolbox' (rbsh, rbcli, etc) +export RBIP="192.168.13.203" +export RBLOG="administrator" +export RBPASS="administrator" +export RBROOTPASS="ekitool" + diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index fa49a54..e9761da 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -15,6 +15,7 @@ bind l select-pane -R \; display-panes bind h select-pane -L \; display-panes bind C-l last-pane \; display-panes bind L last-pane \; display-panes +bind s swap-pane # Window navigation bind Tab last-window @@ -32,7 +33,7 @@ bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-no-clear bind -T copy-mode-vi DoubleClick1Pane select-pane \; send -X select-word bind -T copy-mode-vi TripleClick1Pane select-pane \; send -X select-line bind -T copy-mode-vi Escape send -X cancel - +bind -T copy-mode-vi f send -X search-backward # Window actions From 6de1045383ab8944271955e18337b6c0ebb732f4 Mon Sep 17 00:00:00 2001 From: HerrCraziDev Date: Thu, 25 Jan 2024 13:59:33 +0100 Subject: [PATCH 3/9] add pacman alias 'spu' --- .aliases | 1 + 1 file changed, 1 insertion(+) diff --git a/.aliases b/.aliases index 09517fb..1fcfdd0 100644 --- a/.aliases +++ b/.aliases @@ -9,6 +9,7 @@ alias sai='sudo apt install' alias sau='sudo apt update' alias safu='sudo apt full-upgrade' alias safy='sudo apt full-upgrade -y' +alias spu='sudo pacman -Sy archlinux-keyring && sudo pacman -Syu' alias fullup='safy' alias fug='safy' alias gtop='watch -tn 0.5 nvidia-smi' From 293a7e9f0720945a632c7d9ec57889dcdcd07a92 Mon Sep 17 00:00:00 2001 From: HerrCraziDev Date: Thu, 25 Jan 2024 14:06:13 +0100 Subject: [PATCH 4/9] reserve rbsh and auto tmux session for WSL --- .termrc | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.termrc b/.termrc index 7888b4c..62bcf7a 100644 --- a/.termrc +++ b/.termrc @@ -85,20 +85,19 @@ if [ -n "$WSLENV" ] ; then echo "Serial logs will be written to $SERIAL_LOGS" fi fi -fi - -# Automatically creates and attach a 'main' tmux session. If already created, -# attach in a new window instead. If running from tmux, does nothing. -if [ -z "$TMUX" ] ; then - #if [ tmux ls -F "#S" | grep $HRNX_TMUX_SESSIONNAME ] ; then - tmux new-session -A -s $HRNX_TMUX_SESSIONNAME + # Automatically creates and attach a 'main' tmux session. If already created, + # attach in a new window instead. If running from tmux, does nothing. + if [ -z "$TMUX" ] ; then + #if [ tmux ls -F "#S" | grep $HRNX_TMUX_SESSIONNAME ] ; then + + tmux new-session -A -s $HRNX_TMUX_SESSIONNAME + fi + + # Env for 'mgnt toolbox' (rbsh, rbcli, etc) + export RBIP="192.168.13.203" + export RBLOG="administrator" + export RBPASS="administrator" + export RBROOTPASS="ekitool" fi -# Env for 'mgnt toolbox' (rbsh, rbcli, etc) -export RBIP="192.168.13.203" -export RBLOG="administrator" -export RBPASS="administrator" -export RBROOTPASS="ekitool" - - From a54bdfe1c7ed37e9a55abe4f5847e866fb524d6d Mon Sep 17 00:00:00 2001 From: HerrCraziDev Date: Mon, 25 Mar 2024 19:24:41 +0100 Subject: [PATCH 5/9] wip: create separate windows for sessions --- .termrc | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.termrc b/.termrc index 62bcf7a..f27c27e 100644 --- a/.termrc +++ b/.termrc @@ -34,6 +34,9 @@ export LANGUAGE="en_US.UTF-8" # Decompress raw zlib files (.dat) zlibd() (printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" | cat - "$@" | gzip -dc) +# Kilroy was here ! #2 +export _KILROY_WAS_HERE=2 + # Run WSL-specific inits if [ -n "$WSLENV" ] ; then printf '\e[34m [termrc] Running on WSL\e[0m\n' @@ -75,6 +78,7 @@ if [ -n "$WSLENV" ] ; then usbipd.exe wsl list 2> /dev/null else echo "No serial port found matching device type $USB_SERIAL_HWID" + export _SERIAL_INIT=0 fi # Configure serial logs @@ -89,15 +93,28 @@ if [ -n "$WSLENV" ] ; then # Automatically creates and attach a 'main' tmux session. If already created, # attach in a new window instead. If running from tmux, does nothing. if [ -z "$TMUX" ] ; then - #if [ tmux ls -F "#S" | grep $HRNX_TMUX_SESSIONNAME ] ; then + if tmux has -t $HRNX_TMUX_SESSIONNAME ; then + if [ -v $VSCODE_EMBEDDED_TERM ] ; then + tmux new-session -t $HRNX_TMUX_SESSIONNAME -s vscode -e VSCODE_EMBEDDED_TERM=1 \; new-window -n vscode + else + tmux new-session -t $HRNX_TMUX_SESSIONNAME -s terminal \; new-window + fi - tmux new-session -A -s $HRNX_TMUX_SESSIONNAME + echo "New terminal" + fi + + tmux new-session -A -s $HRNX_TMUX_SESSIONNAME -t $HRNX_TMUX_SESSIONNAME fi # Env for 'mgnt toolbox' (rbsh, rbcli, etc) - export RBIP="192.168.13.203" + export RBIP="192.168.9.203" export RBLOG="administrator" export RBPASS="administrator" export RBROOTPASS="ekitool" + + export _KILROY_WAS_HERE=3 + + # Setup functions for DEY SDK envs (pm800) + source ~/sh/sdk-setenv.sh fi From ae8fd1d155a5a02a92e4012e95c7ec8999146f62 Mon Sep 17 00:00:00 2001 From: HerrCraziDev Date: Tue, 9 Apr 2024 11:22:40 +0200 Subject: [PATCH 6/9] Automatic tmux session creation/resume existing sessions from terminal or vscode --- .termrc | 54 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/.termrc b/.termrc index f27c27e..acda968 100644 --- a/.termrc +++ b/.termrc @@ -1,4 +1,7 @@ +# Pre-define 'reload' in case .aliases dont provide it +alias reload='source ~/.termrc' + # Load personal aliases source "$HOME/.aliases" @@ -7,6 +10,7 @@ if [ -e $HOME/.tmux/.tmux-aliases ] ; then source $HOME/.tmux/.tmux-aliases fi +# Set base tmux session name if [ -n "$WSLENV" ] ; then HRNX_TMUX_SESSIONNAME="wsl" else @@ -37,6 +41,23 @@ zlibd() (printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" | cat - "$@" | gzip -dc) # Kilroy was here ! #2 export _KILROY_WAS_HERE=2 +# Make scripts executable in a dir +fixsh () { + if [ -d $1 ] ; then + find $1 -type f -name "*.sh" -exec chmod a+x {} \; + find $1 -type f -name "*.bash" -exec chmod a+x {} \; + find $1 -type f -name "*.zsh" -exec chmod a+x {} \; + find $1 -type f -name "*.lua" -exec chmod a+x {} \; + find $1 -type f -name "*.py" -exec chmod a+x {} \; + find $1 -type f -name "*.pl" -exec chmod a+x {} \; + fi +} + +# User scripts & bins executable +fixsh $HOME/sh +fixsh $HOME/bin + + # Run WSL-specific inits if [ -n "$WSLENV" ] ; then printf '\e[34m [termrc] Running on WSL\e[0m\n' @@ -56,9 +77,9 @@ if [ -n "$WSLENV" ] ; then source "$HOME/.usbipd" # Connect serial console ports - echo "Connecting serial port... (device $USB_SERIAL_HWID)" + echo "Connecting serial port... (device ${USB_SERIAL_HWID:="0403:6001"})" - bus_ids=$( usbipd.exe wsl list 2> /dev/null | grep "0403:6001" ) + bus_ids=$( usbipd.exe list 2> /dev/null | grep "$USB_SERIAL_HWID" ) if [ -n "$bus_ids" ] ; then echo $bus_ids @@ -66,7 +87,7 @@ if [ -n "$WSLENV" ] ; then bus_ids=$( tr -s ' ' <<< $bus_ids | cut -d ' ' -f1 | tr '\n' ' ' ) for bus_id in $=bus_ids ; do - usbipd.exe wsl attach --busid $bus_id 2> /dev/null + usbipd.exe attach --wsl --busid $bus_id 2> /dev/null if [ $? -eq 0 ]; then echo "Serial port $bus_id connected" export _SERIAL_INIT=$(($_SERIAL_INIT+1)) @@ -92,26 +113,35 @@ if [ -n "$WSLENV" ] ; then # Automatically creates and attach a 'main' tmux session. If already created, # attach in a new window instead. If running from tmux, does nothing. - if [ -z "$TMUX" ] ; then + if [ -z "$TMUX" ] && which tmux ; then + # Check if this script has already created a base session, then create a new session with a new blank window for the new terminal. + # If a session had already been created and left detached, attach to that instead. if tmux has -t $HRNX_TMUX_SESSIONNAME ; then - if [ -v $VSCODE_EMBEDDED_TERM ] ; then - tmux new-session -t $HRNX_TMUX_SESSIONNAME -s vscode -e VSCODE_EMBEDDED_TERM=1 \; new-window -n vscode + if [ "$VSCODE_EMBEDDED_TERM" = 1 ] ; then + # Running from vscode terminal + count=$(tmux list-sessions -F "#S" -f "#{session_attached}" | grep vscode | wc -l) + tmux new-session -A -t $HRNX_TMUX_SESSIONNAME -s vscode-$(($count+1)) -e VSCODE_EMBEDDED_TERM=1 \; new-window -n vscode-$(($count+1)) else - tmux new-session -t $HRNX_TMUX_SESSIONNAME -s terminal \; new-window + # Running from another tab or window + count=$(tmux list-sessions -F "#S" -f "#{session_attached}" | grep $HRNX_TMUX_SESSIONNAME | wc -l) + tmux new-session -A -t $HRNX_TMUX_SESSIONNAME -s $HRNX_TMUX_SESSIONNAME-$(($count+1)) \; new-window fi - - echo "New terminal" + else + # Create new base session + tmux new-session -A -s $HRNX_TMUX_SESSIONNAME -t $HRNX_TMUX_SESSIONNAME fi - - tmux new-session -A -s $HRNX_TMUX_SESSIONNAME -t $HRNX_TMUX_SESSIONNAME fi # Env for 'mgnt toolbox' (rbsh, rbcli, etc) - export RBIP="192.168.9.203" + export RBIP="10.102.88.203" export RBLOG="administrator" export RBPASS="administrator" export RBROOTPASS="ekitool" + export PMCTL_SSH_IP="10.102.88.203" + export PMCTL_SSH_USER="root" + export PMCTL_SSH_PORT=2222 + export _KILROY_WAS_HERE=3 # Setup functions for DEY SDK envs (pm800) From 4ab4a5d2becf084021b2a186bfd2db9397e55c76 Mon Sep 17 00:00:00 2001 From: HerrCraziDev Date: Tue, 9 Apr 2024 11:23:49 +0200 Subject: [PATCH 7/9] tmux: pane title bars (styled) --- tmux/.tmux.conf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index e9761da..d98ac91 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -22,6 +22,9 @@ bind Tab last-window bind Enter copy-mode bind Escape copy-mode +# Switch windows or sessions +bind a choose-tree -sG + # Copy mode set -g mode-keys vi # set vim keys bind C-v paste-buffer @@ -57,7 +60,7 @@ set -g mouse on set -g status-bg colour235 set -g status-fg colour255 -set -g status-left '#(sh ~/.tmux/health-indicator.sh #{client_prefix})#(~/.tmux/segment.sh end 29) ▣ #{session_windows} #{?session_many_attached,#(~/.tmux/subsegment.sh end) 🖥 #{session-attached},}#(~/.tmux/segment.sh end 29 71) #[fg=colour235]#H #(~/.tmux/segment.sh end 71 65) #[fg=colour235]#(whoami) #(~/.tmux/segment.sh end 65 235)' +set -g status-left '#(sh ~/.tmux/health-indicator.sh #{client_prefix})#(~/.tmux/segment.sh end 29) ▣ #{session_windows} #{?session_group_many_attached,#(~/.tmux/subsegment.sh end) 🖥 #{session_group_attached},}#(~/.tmux/segment.sh end 29 71) #[fg=colour235]#H #(~/.tmux/segment.sh end 71 65) #[fg=colour235]#(whoami) #(~/.tmux/segment.sh end 65 235)' set -g status-left-length 80 set -g status-right-length 120 set -g status-justify centre @@ -69,3 +72,8 @@ set -g window-status-current-format '#(~/.tmux/segment.sh start 235 71 round)#[f set -g status-right '#{?#(~/.tmux/mediaplaying.sh test),#(~/.tmux/segment.sh start 235 65)#[fg=colour235] ♫ #(~/.tmux/mediaplaying.sh) #(~/.tmux/segment.sh start 65 71),#(~/.tmux/segment.sh start 235 71)}#[fg=colour235] %H:%M:%S #(~/.tmux/subsegment.sh start) %d %b ' set -g pane-active-border-style fg=colour76 + +# Pane titles +set -g pane-border-status top +set -g pane-border-format "#(~/.tmux/segment.sh start)#[reverse] #{pane_index} - #{pane_title} #[default]#(~/.tmux/segment.sh end)" + From 388f3a1f78dfb7fbd2fa8e63187274753c880feb Mon Sep 17 00:00:00 2001 From: HerrCraziDev Date: Thu, 18 Apr 2024 11:17:01 +0200 Subject: [PATCH 8/9] zsh: enable single-tab completion$ --- .zshrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index d197da5..e77e0b5 100644 --- a/.zshrc +++ b/.zshrc @@ -31,7 +31,7 @@ source "$HOME/.termrc" # The following lines were added by compinstall -zstyle ':completion:*' completer _list _expand _complete _ignored _approximate _prefix +zstyle ':completion:*' completer _expand _complete _ignored _approximate _prefix zstyle ':completion:*' expand prefix zstyle ':completion:*' file-sort name zstyle ':completion:*' ignore-parents parent @@ -69,3 +69,6 @@ bindkey -e # Disable zsh globbing error messages, leave it to the called program setopt +o nomatch +# Set immediate completion +setopt menu_complete + From bbbc83d929e97d1aad95a8b81d3c2864bc4b827f Mon Sep 17 00:00:00 2001 From: HerrCraziDev Date: Mon, 9 Sep 2024 15:59:39 +0200 Subject: [PATCH 9/9] Enable colors for some tools --- .termrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.termrc b/.termrc index acda968..3eb4a44 100644 --- a/.termrc +++ b/.termrc @@ -35,6 +35,12 @@ export EDITOR=/usr/bin/vim export LANG="en_US.UTF-8" export LANGUAGE="en_US.UTF-8" +# Colors +alias diff='diff --color=auto' +alias grep='grep --color=auto' +alias ip='ip -color=auto' +alias ls='ls --color=auto' + # Decompress raw zlib files (.dat) zlibd() (printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" | cat - "$@" | gzip -dc) @@ -69,6 +75,9 @@ if [ -n "$WSLENV" ] ; then # Enable entr workaround for incomplete inotify support on WSL export ENTR_INOTIFY_WORKAROUND=1 + # Add Ubuntu debuginfod server + export DEBUGINFOD_URLS="https://debuginfod.ubuntu.com" + # Re-init serial reinit() (unset _SERIAL_INIT; reload)