From 4fc0bc90f06b158b0b46b9dcdef30c5f13495d84 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 5 Nov 2020 17:25:41 +0100 Subject: Aliases update --- .config/nvim/settings.vim | 1 + .config/zsh/alias.zsh | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/.config/nvim/settings.vim b/.config/nvim/settings.vim index 1826e2e..74c5678 100644 --- a/.config/nvim/settings.vim +++ b/.config/nvim/settings.vim @@ -1,3 +1,4 @@ +set noautochdir set bg=dark set clipboard^=unnamedplus set cursorline diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh index aecf6cc..568aacc 100644 --- a/.config/zsh/alias.zsh +++ b/.config/zsh/alias.zsh @@ -48,11 +48,42 @@ alias stopdocker='docker-machine stop docker-home' alias envdocker='eval `docker-machine env docker-home`' alias vimz='nvim $(fzf)' alias v='nvim $(fzf)' -alias pa='cd $HOME/.local/packs && ls' -alias co='cd $XDG_CONFIG_HOME/ && ls' +pa() { + if [ "$1" ]; then + if cd "$HOME"/.local/packs/"$1"; then + ls + else + cd "$HOME"/.local/packs && ls + fi + else + cd "$HOME"/.local/packs && ls + fi +} +co() { + if [ "$1" ]; then + if cd "$XDG_CONFIG_HOME"/"$1"; then + ls + else + cd "$XDG_CONFIG_HOME" && ls + fi + else + cd "$XDG_CONFIG_HOME" && ls + fi +} +da() { + if [ "$1" ]; then + if cd "$XDG_DATA_HOME"/"$1"; then + ls + else + cd "$XDG_DATA_HOME" && ls + fi + else + cd "$XDG_DATA_HOME" && ls + fi +} alias bi='cd $HOME/.local/bin && ls' twi() { - mpview https://twitch.tv/$1; + mpview https://twitch.tv/"$1"; } alias nb='newsboat' alias mutt='neomutt' -- cgit v1.2.3