From b47f79401ffa4a34c968b1abc4fd3595afc9165f Mon Sep 17 00:00:00 2001 From: Arti Zirk Date: Wed, 21 Jun 2023 20:58:08 +0300 Subject: [PATCH] Make new-scrach use local variables --- .zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index 7931831..820429f 100644 --- a/.zshrc +++ b/.zshrc @@ -182,8 +182,8 @@ setopt pushdminus # Utility functions function new-scratch { - cur_dir="$HOME/scratch" - new_dir="$HOME/tmp/scratch-`date +'%s'`" + local cur_dir="$HOME/scratch" + local new_dir="$HOME/tmp/scratch-`date +'%s'`" mkdir -p $new_dir ln -nfs $new_dir $cur_dir cd $cur_dir