From a7601f0c5586a6aef9dc7220c5dc635ceed8da6f Mon Sep 17 00:00:00 2001 From: Fabio Scotto di Santolo Date: Mon, 18 Aug 2025 12:00:40 +0200 Subject: [PATCH] Remove Oh My ZSH dependency of my ZSH configuration --- .gitmodules | 15 +- zsh/.oh-my-zsh/custom/aliases.zsh | 30 --- zsh/.oh-my-zsh/custom/plugins/fzf | 1 - zsh/.profile.d/{sway-startup.sh => runwm.sh} | 0 zsh/.zsh/plugins/colored-man-pages.plugin.zsh | 54 +++++ zsh/.zsh/plugins/command-not-found.plugin.zsh | 70 ++++++ zsh/{.profile.d => .zsh/plugins}/fzf-git.sh | 0 zsh/.zsh/plugins/mise.plugin.zsh | 27 +++ zsh/.zsh/plugins/zoxide.plugin.zsh | 5 + .../plugins/zsh-autosuggestions | 0 .../plugins/zsh-syntax-highlighting | 0 zsh/.zshenv | 27 ++- zsh/.zshrc | 205 ++++++++---------- 13 files changed, 268 insertions(+), 166 deletions(-) delete mode 100644 zsh/.oh-my-zsh/custom/aliases.zsh delete mode 160000 zsh/.oh-my-zsh/custom/plugins/fzf rename zsh/.profile.d/{sway-startup.sh => runwm.sh} (100%) create mode 100755 zsh/.zsh/plugins/colored-man-pages.plugin.zsh create mode 100755 zsh/.zsh/plugins/command-not-found.plugin.zsh rename zsh/{.profile.d => .zsh/plugins}/fzf-git.sh (100%) create mode 100755 zsh/.zsh/plugins/mise.plugin.zsh create mode 100755 zsh/.zsh/plugins/zoxide.plugin.zsh rename zsh/{.oh-my-zsh/custom => .zsh}/plugins/zsh-autosuggestions (100%) rename zsh/{.oh-my-zsh/custom => .zsh}/plugins/zsh-syntax-highlighting (100%) diff --git a/.gitmodules b/.gitmodules index 833e789..d5c9daf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,18 +19,15 @@ [submodule "tmux/.tmux/plugins/tmux"] path = tmux/.tmux/plugins/tmux url = https://github.com/catppuccin/tmux.git -[submodule "zsh/.oh-my-zsh/custom/plugins/zsh-autosuggestions"] - path = zsh/.oh-my-zsh/custom/plugins/zsh-autosuggestions - url = https://github.com/zsh-users/zsh-autosuggestions.git -[submodule "zsh/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"] - path = zsh/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting - url = https://github.com/zsh-users/zsh-syntax-highlighting.git -[submodule "zsh/.oh-my-zsh/custom/plugins/fzf"] - path = zsh/.oh-my-zsh/custom/plugins/fzf - url = https://github.com/junegunn/fzf.git [submodule "tmux/.tmux/plugins/tmux-continuum"] path = tmux/.tmux/plugins/tmux-continuum url = https://git::@github.com/tmux-plugins/tmux-continuum [submodule "tmux/.tmux/plugins/tmux-resurrect"] path = tmux/.tmux/plugins/tmux-resurrect url = https://git::@github.com/tmux-plugins/tmux-resurrect +[submodule "zsh/.zsh/plugins/zsh-autosuggestions"] + path = zsh/.zsh/plugins/zsh-autosuggestions + url = https://github.com/zsh-users/zsh-autosuggestions.git +[submodule "zsh/.zsh/plugins/zsh-syntax-highlighting"] + path = zsh/.zsh/plugins/zsh-syntax-highlighting + url = https://github.com/zsh-users/zsh-syntax-highlighting.git diff --git a/zsh/.oh-my-zsh/custom/aliases.zsh b/zsh/.oh-my-zsh/custom/aliases.zsh deleted file mode 100644 index 007eea6..0000000 --- a/zsh/.oh-my-zsh/custom/aliases.zsh +++ /dev/null @@ -1,30 +0,0 @@ -pbcopy() { - if [ -f "$1" ]; then - mime_type=$(file --mime-type -b "$1") - wl-copy --type "$mime_type" < "$1" - else - printf "%s" "$*" | wl-copy - fi -} - -alias pbpaste='wl-paste --no-newline' -alias ls="eza --color=always --group-directories-first --icons=always" -alias cat='bat --style header --style snip --style changes --pager never' - -# Replace df command tool -alias df='duf' - -# Replace Vim implementation -alias vi='nvim' -alias vim='nvim' - -# Replace grep command tool -alias grep='ugrep --color=auto' -alias egrep='ugrep -E --color=auto' -alias fgrep='ugrep -F --color=auto' - -# Other aliases -alias paths='echo -e ${PATH//:/\\n}' # path: Echo all executable Paths -alias userlist="cut -d: -f1 /etc/passwd | sort" -alias ip='ip -color' -alias stow='stow -d $DOTFILES ' diff --git a/zsh/.oh-my-zsh/custom/plugins/fzf b/zsh/.oh-my-zsh/custom/plugins/fzf deleted file mode 160000 index 4efcc34..0000000 --- a/zsh/.oh-my-zsh/custom/plugins/fzf +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4efcc344c35e8bb7e6ba7bb23e5885051420b361 diff --git a/zsh/.profile.d/sway-startup.sh b/zsh/.profile.d/runwm.sh similarity index 100% rename from zsh/.profile.d/sway-startup.sh rename to zsh/.profile.d/runwm.sh diff --git a/zsh/.zsh/plugins/colored-man-pages.plugin.zsh b/zsh/.zsh/plugins/colored-man-pages.plugin.zsh new file mode 100755 index 0000000..57facbb --- /dev/null +++ b/zsh/.zsh/plugins/colored-man-pages.plugin.zsh @@ -0,0 +1,54 @@ +# Requires colors autoload. +# See termcap(5). + +# Set up once, and then reuse. This way it supports user overrides after the +# plugin is loaded. +typeset -AHg less_termcap + +# bold & blinking mode +less_termcap[mb]="${fg_bold[red]}" +less_termcap[md]="${fg_bold[red]}" +less_termcap[me]="${reset_color}" +# standout mode +less_termcap[so]="${fg_bold[yellow]}${bg[blue]}" +less_termcap[se]="${reset_color}" +# underlining +less_termcap[us]="${fg_bold[green]}" +less_termcap[ue]="${reset_color}" + +# Handle $0 according to the standard: +# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html +0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" +0="${${(M)0:#/*}:-$PWD/$0}" + +# Absolute path to this file's directory. +typeset -g __colored_man_pages_dir="${0:A:h}" + +function colored() { + local -a environment + + # Convert associative array to plain array of NAME=VALUE items. + local k v + for k v in "${(@kv)less_termcap}"; do + environment+=( "LESS_TERMCAP_${k}=${v}" ) + done + + # Prefer `less` whenever available, since we specifically configured + # environment for it. + environment+=( PAGER="${commands[less]:-$PAGER}" ) + environment+=( GROFF_NO_SGR=1 ) + + # See ./nroff script. + if [[ "$OSTYPE" = solaris* ]]; then + environment+=( PATH="${__colored_man_pages_dir}:$PATH" ) + fi + + command env $environment "$@" +} + +# Colorize man and dman/debman (from debian-goodies) +function man \ + dman \ + debman { + colored $0 "$@" +} diff --git a/zsh/.zsh/plugins/command-not-found.plugin.zsh b/zsh/.zsh/plugins/command-not-found.plugin.zsh new file mode 100755 index 0000000..c741e18 --- /dev/null +++ b/zsh/.zsh/plugins/command-not-found.plugin.zsh @@ -0,0 +1,70 @@ +## Platforms with a built-in command-not-found handler init file + +for file ( + # Arch Linux. Must have pkgfile installed: https://wiki.archlinux.org/index.php/Pkgfile#Command_not_found + /usr/share/doc/pkgfile/command-not-found.zsh + # Homebrew: https://github.com/Homebrew/homebrew-command-not-found + /opt/homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh + /usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh + /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh +); do + if [[ -r "$file" ]]; then + source "$file" + unset file + return 0 + fi +done +unset file + + +## Platforms with manual command_not_found_handler() setup + +# Debian and derivatives: https://launchpad.net/ubuntu/+source/command-not-found +if [[ -x /usr/lib/command-not-found || -x /usr/share/command-not-found/command-not-found ]]; then + command_not_found_handler() { + if [[ -x /usr/lib/command-not-found ]]; then + /usr/lib/command-not-found -- "$1" + return $? + elif [[ -x /usr/share/command-not-found/command-not-found ]]; then + /usr/share/command-not-found/command-not-found -- "$1" + return $? + else + printf "zsh: command not found: %s\n" "$1" >&2 + return 127 + fi + } +fi + +# Fedora: https://fedoraproject.org/wiki/Features/PackageKitCommandNotFound +if [[ -x /usr/libexec/pk-command-not-found ]]; then + command_not_found_handler() { + if [[ -S /var/run/dbus/system_bus_socket && -x /usr/libexec/packagekitd ]]; then + /usr/libexec/pk-command-not-found "$@" + return $? + fi + + printf "zsh: command not found: %s\n" "$1" >&2 + return 127 + } +fi + +# NixOS: https://github.com/NixOS/nixpkgs/tree/master/nixos/modules/programs/command-not-found +if [[ -x /run/current-system/sw/bin/command-not-found ]]; then + command_not_found_handler() { + /run/current-system/sw/bin/command-not-found "$@" + } +fi + +# Termux: https://github.com/termux/command-not-found +if [[ -x /data/data/com.termux/files/usr/libexec/termux/command-not-found ]]; then + command_not_found_handler() { + /data/data/com.termux/files/usr/libexec/termux/command-not-found "$1" + } +fi + +# SUSE and derivates: https://www.unix.com/man-page/suse/1/command-not-found/ +if [[ -x /usr/bin/command-not-found ]]; then + command_not_found_handler() { + /usr/bin/command-not-found "$1" + } +fi diff --git a/zsh/.profile.d/fzf-git.sh b/zsh/.zsh/plugins/fzf-git.sh similarity index 100% rename from zsh/.profile.d/fzf-git.sh rename to zsh/.zsh/plugins/fzf-git.sh diff --git a/zsh/.zsh/plugins/mise.plugin.zsh b/zsh/.zsh/plugins/mise.plugin.zsh new file mode 100755 index 0000000..96686f6 --- /dev/null +++ b/zsh/.zsh/plugins/mise.plugin.zsh @@ -0,0 +1,27 @@ +# TODO: 2024-01-03 remove rtx support +local __mise=mise +if (( ! $+commands[mise] )); then + if (( $+commands[rtx] )); then + __mise=rtx + else + return + fi +fi + +# Load mise hooks +eval "$($__mise activate zsh)" + +# Hook mise into current environment +eval "$($__mise hook-env -s zsh)" + +# If the completion file doesn't exist yet, we need to autoload it and +# bind it to `mise`. Otherwise, compinit will have already done that. +if [[ ! -f "$ZSH_CACHE_DIR/completions/_$__mise" ]]; then + typeset -g -A _comps + autoload -Uz _$__mise + _comps[$__mise]=_$__mise +fi + +# Generate and load mise completion +$__mise completion zsh >| "$ZSH_CACHE_DIR/completions/_$__mise" &| +unset __mise diff --git a/zsh/.zsh/plugins/zoxide.plugin.zsh b/zsh/.zsh/plugins/zoxide.plugin.zsh new file mode 100755 index 0000000..25d2e83 --- /dev/null +++ b/zsh/.zsh/plugins/zoxide.plugin.zsh @@ -0,0 +1,5 @@ +if (( $+commands[zoxide] )); then + eval "$(zoxide init --cmd ${ZOXIDE_CMD_OVERRIDE:-z} zsh)" +else + echo '[oh-my-zsh] zoxide not found, please install it from https://github.com/ajeetdsouza/zoxide' +fi diff --git a/zsh/.oh-my-zsh/custom/plugins/zsh-autosuggestions b/zsh/.zsh/plugins/zsh-autosuggestions similarity index 100% rename from zsh/.oh-my-zsh/custom/plugins/zsh-autosuggestions rename to zsh/.zsh/plugins/zsh-autosuggestions diff --git a/zsh/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting b/zsh/.zsh/plugins/zsh-syntax-highlighting similarity index 100% rename from zsh/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting rename to zsh/.zsh/plugins/zsh-syntax-highlighting diff --git a/zsh/.zshenv b/zsh/.zshenv index f4f5822..6d78574 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,13 +1,28 @@ +# XDG Settings Basic +export XDG_CONFIG_HOME=${HOME}/.config +export XDG_DATA_HOME=${HOME}/.local/share +export XDG_CACHE_HOME=${HOME}/.local/cache +export XDG_STATE_HOME=${HOME}/.local/state export DOTFILES="$HOME/.dotfiles" -export MANPAGER="nvim +Man!" export EDITOR=nvim export HELPDIR=/usr/share/zsh/"${ZSH_VERSION}"/help export MISE_HOME=$HOME/.local/share/mise/installs +export MANPAGER="less -R --use-color -Dd+r -Du+b" # colored man pages + +# colored less + termcap vars +export LESS="R --use-color -Dd+r -Du+b" +export LESS_TERMCAP_mb="$(printf '%b' '[1;31m')" +export LESS_TERMCAP_md="$(printf '%b' '[1;36m')" +export LESS_TERMCAP_me="$(printf '%b' '[0m')" +export LESS_TERMCAP_so="$(printf '%b' '[01;44;33m')" +export LESS_TERMCAP_se="$(printf '%b' '[0m')" +export LESS_TERMCAP_us="$(printf '%b' '[1;32m')" +export LESS_TERMCAP_ue="$(printf '%b' '[0m')" # fzf -export FZF_DEFAULT_COMMAND="fd --hidden --type file --strip-cwd-prefix --exclude .git" +export FZF_DEFAULT_COMMAND="fdfind --hidden --type file --strip-cwd-prefix --exclude .git" export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" -export FZF_ALT_C_COMMAND="fd --hidden --type directory --strip-cwd-prefix --exclude .git" +export FZF_ALT_C_COMMAND="fdfind --hidden --type directory --strip-cwd-prefix --exclude .git" # Export Catppuccin Mocha theme for FZF export FZF_DEFAULT_OPTS=" \ --height 60% --layout=reverse --border \ @@ -17,8 +32,6 @@ export FZF_DEFAULT_OPTS=" \ --color=selected-bg:#45475A \ --color=border:#313244,label:#CDD6F4" export FZF_TMUX_OPTS=" -p90%,70%" -export FZF_CTRL_T_OPTS="--preview 'bat --color=always -n --line-range :500 {}'" -export FZF_ALT_C_OPTS="--preview 'eza --tree --color=always {} | head -200'" # Golang if command -v go >/dev/null 2>&1; then @@ -31,10 +44,6 @@ if command -v java >/dev/null 2>&1; then export JAVA_HOME="$(dirname $(mise bin-paths | grep -i java))" fi -if command -v jmeter >/dev/null 2>&1; then - export JMETER_HOME="$(which jmeter)" -fi - # Python export VIRTUAL_ENV_DISABLE_PROMPT=1 diff --git a/zsh/.zshrc b/zsh/.zshrc index 6323ea4..8fe4d90 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,130 +1,103 @@ -# If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH +# main zsh settings. env in ~/.zprofile +# read second -# Path to your oh-my-zsh installation. -export ZSH="$HOME/.oh-my-zsh" - -# Set name of the theme to load --- if set to "random", it will -# load a random theme each time oh-my-zsh is loaded, in which case, -# to know which specific one was loaded, run: echo $RANDOM_THEME -# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes -# ZSH_THEME="robbyrussell" - -# Set list of themes to pick from when loading at random -# Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in $ZSH/themes/ -# If set to an empty array, this variable will have no effect. -# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) - -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. -# Case-sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment one of the following lines to change the auto-update behavior -# zstyle ':omz:update' mode disabled # disable automatic updates -# zstyle ':omz:update' mode auto # update automatically without asking -# zstyle ':omz:update' mode reminder # just remind me to update when it's time - -# Uncomment the following line to change how often to auto-update (in days). -# zstyle ':omz:update' frequency 13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" - -# Uncomment the following line to display red dots whilst waiting for completion. -# You can also set it to another string to have that shown instead of the default red dots. -# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" -# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) -# COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. -# HIST_STAMPS="mm/dd/yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -ZSH_CUSTOM=$ZSH/custom - -# Which plugins would you like to load? -# Standard plugins can be found in $ZSH/plugins/ -# Custom plugins may be added to $ZSH_CUSTOM/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. -plugins=( - aws - colored-man-pages - command-not-found - gitignore - mise - zoxide - zsh-autosuggestions - zsh-interactive-cd - zsh-navigation-tools - zsh-syntax-highlighting -) - -source $ZSH/oh-my-zsh.sh - -# User configuration +export ZSH_HOME="$HOME/.zsh" +# source global shell alias & variables files [[ ! -f ~/.zshenv ]] || source ~/.zshenv -# export MANPATH="/usr/local/man:$MANPATH" +# load modules +zmodload zsh/complist +autoload -U compinit && compinit +autoload -U colors && colors +# autoload -U tetris # main attraction of zsh, obviously -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 +# cmp opts +zstyle ':completion:*' menu select # tab opens cmp menu +zstyle ':completion:*' special-dirs true # force . and .. to show in cmp menu +zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} ma=0\;33 # colorize cmp menu +# zstyle ':completion:*' file-list true # more detailed list +zstyle ':completion:*' squeeze-slashes false # explicit disable to allow /*/ expansion -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi +# main opts +setopt append_history inc_append_history share_history # better history +# on exit, history appends rather than overwrites; history is appended as soon as cmds executed; history shared across sessions +setopt auto_menu menu_complete # autocmp first menu match +setopt autocd # type a dir to cd +setopt auto_param_slash # when a dir is completed, add a / instead of a trailing space +setopt no_case_glob no_case_match # make cmp case insensitive +setopt globdots # include dotfiles +setopt extended_glob # match ~ # ^ +setopt interactive_comments # allow comments in shell +unsetopt prompt_sp # don't autoclean blanklines +stty stop undef # disable accidental ctrl s -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" - -# Setup emacs keymap -bindkey -e +# history opts +HISTSIZE=1000000 +SAVEHIST=1000000 +# HISTFILE="$XDG_CACHE_HOME/zsh_history" # move histfile to cache +HISTCONTROL=ignoreboth # consecutive duplicates & commands starting with space are not saved fpath=(~/.zsh $fpath) autoload run-help -autoload -Uz compinit && compinit -u -if command -v starship > /dev/null 2>&1; then - # Initialize Starship - eval "$(starship init zsh)" -fi +# fzf setup +source <(fzf --zsh) # allow for fzf history widget + +# binds +bindkey "^a" beginning-of-line +bindkey "^e" end-of-line +bindkey "^k" kill-line +bindkey "^j" backward-word +bindkey "^k" forward-word +bindkey "^H" backward-kill-word +# ctrl J & K for going up and down in prev commands +bindkey "^J" history-search-forward +bindkey "^K" history-search-backward +bindkey '^R' fzf-history-widget + +# set up prompt +NEWLINE=$'\n' +PROMPT='%F{blue}%B%~%b%f %F{green}❯%f ' + +# load plugins +ZSH_PLUGINS_DIR="$ZSH_HOME/plugins" +[ -e "$ZSH_PLUGINS_DIR/colored-man-pages.plugin.zsh" ] && source "$ZSH_PLUGINS_DIR/colored-man-pages.plugin.zsh" +[ -e "$ZSH_PLUGINS_DIR/command-not-found-plugin.zsh" ] && source "$ZSH_PLUGINS_DIR/command-not-found-plugin.zsh" +[ -e "$ZSH_PLUGINS_DIR/mise.plugin.zsh" ] && source "$ZSH_PLUGINS_DIR/mise.plugin.zsh" +[ -e "$ZSH_PLUGINS_DIR/zoxide.plugin.zsh" ] && source "$ZSH_PLUGINS_DIR/zoxide.plugin.zsh" +[ -e "$ZSH_PLUGINS_DIR/fzf-git.sh" ] && source "$ZSH_PLUGINS_DIR/fzf-git.sh" +[ -e "$ZSH_PLUGINS_DIR/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ] && source "$ZSH_PLUGINS_DIR/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" +[ -e "$ZSH_PLUGINS_DIR/zsh-autosuggestions/zsh-autosuggestions.zsh" ] && source "$ZSH_PLUGINS_DIR/zsh-autosuggestions/zsh-autosuggestions.zsh" + +# define user aliases +pbcopy() { + if [ -f "$1" ]; then + mime_type=$(file --mime-type -b "$1") + wl-copy --type "$mime_type" < "$1" + else + printf "%s" "$*" | wl-copy + fi +} + +alias pbpaste='wl-paste --no-newline' +alias ls='ls --color=auto --group-directories-first' + +# Replace Vim implementation +alias vi='nvim' +alias vim='nvim' + +# Replace grep command tool +alias grep='grep --color=auto' +alias egrep='grep -E' +alias fgrep='grep -F' + +# Other aliases +alias paths='echo -e ${PATH//:/\\n}' # path: Echo all executable Paths +alias userlist="cut -d: -f1 /etc/passwd | sort" +alias ip='ip -color' +alias stow='stow -d $DOTFILES ' case ":$PATH:" in *":$HOME/.local/bin:"*) ;; @@ -135,8 +108,6 @@ if [ -e "$HOME/.cargo" ]; then source "$HOME/.cargo/env" fi -source <(fzf --zsh) - if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then tmux attach-session -t default || tmux new-session -s default fi