From a1e6124c582797e2040856df7a3da9bde3df8fe3 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 8 Sep 2022 08:36:50 +0300 Subject: Made some alises vailable to server config and fixed cdl, cdg, cds aliases going to home folder when there is no input --- .zshrc | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index da4b0dd..36e044a 100644 --- a/.zshrc +++ b/.zshrc @@ -153,8 +153,12 @@ device='desktop' # can be either "desktop" (default when empty), "server" or "an # }}} # General commands {{{ + + alias q="exit" + alias x="exit" + if [[ $device != "server" ]]; then - + if [[ -x "$(command -v exa)" ]]; then alias ll="exa --icons --group-directories-first --git --time-style long-iso -a -labh" alias lk="exa --icons --group-directories-first --git --time-style long-iso -labhTL" @@ -166,15 +170,18 @@ device='desktop' # can be either "desktop" (default when empty), "server" or "an alias l="ls -CF" fi - alias q="exit" - alias x="exit" - - alias cdg="cd ~/Programming/GitHub-repos/ && cd" - alias cdl="cd ~/Programming/GitLab-repos/ && cd" - alias cds="cd ~/Programming/source/ && cd" + alias cdg="cd ~/Programming/GitHub-repos/ && nbcd" + alias cdl="cd ~/Programming/GitLab-repos/ && nbcd" + alias cds="cd ~/Programming/source/ && nbcd" + nbcd() { # Non blanc cd + [ -n "$1" ] && cd "$1" || return 0 + } else alias wudo="sudo -u www-data" + alias ll="la -alF" + alias la="ls -A" + alias l="ls -CF" fi # }}} -- cgit v1.2.3