From 2c37d639371fab66c2196cd77fb8860f56679867 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Wed, 30 Oct 2019 19:22:06 +0100 Subject: [PATCH] Simplify tree improvements --- dotfiles/.bashrc | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc index 039d64d..118d557 100644 --- a/dotfiles/.bashrc +++ b/dotfiles/.bashrc @@ -257,21 +257,14 @@ EOS fi } -alias tree="bashrc_tree" -bashrc_tree() { - # The 'tree' alias is not available here, so this calls the actual program. - tree -F --dirsfirst -I '.git|Spotlight-V100|.fseventsd' "$@" -} - -alias ltree="bashrc_paged_tree" -bashrc_paged_tree() { - bashrc_tree -C "$@" | less -R -} - ############################################################################## # Add shell functions ############################################################################## +tree() { command tree --dirsfirst -FI '.git|Spotlight-V100|.fseventsd' "$@"; } + +ltree() { tree -C "$@" | less -R; } + # Combined mkdir and cd mkcd() { mkdir -p -- "$1" && cd -P -- "$1"; }