From 37de05684d6dc4fc4fb55198d42051d03f26c844 Mon Sep 17 00:00:00 2001 From: awy Date: Tue, 5 Nov 2024 13:26:17 +0300 Subject: zsh aliases --- .config/shell/aliasrc | 10 ++++++++++ .config/zsh/.zshrc | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .config/shell/aliasrc diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc new file mode 100644 index 0000000..4c5f00b --- /dev/null +++ b/.config/shell/aliasrc @@ -0,0 +1,10 @@ +# Colorize commands +alias \ + cp="cp -iv" \ + mv="mv -iv" \ + rm="rm -vI" + +alias \ + ls="ls -hN --color=auto" \ + grep="grep --color=auto" \ + ip="ip -color=auto" diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 1dbf6ba..417f268 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -12,7 +12,6 @@ PROMPT='%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[mag setopt autocd # Automatically cd into typed directory. stty stop undef # Disable ctrl-s to freeze terminal. setopt interactive_comments -alias ls='ls --color' HISTSIZE=10000000 SAVEHIST=10000000 @@ -27,6 +26,7 @@ setopt hist_find_no_dups setopt hist_save_no_dups setopt hist_reduce_blanks setopt hist_verify +[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" autoload -U compinit; compinit zstyle ':completion:*' menu select -- cgit v1.2.3