feat: add folder creation to fx

This commit is contained in:
max_richter 2021-01-29 14:25:45 +01:00
parent d380ebc6b4
commit a64761d4ec

View File

@ -1,7 +1,18 @@
# Helps navigating Sync directory # Helps navigating Sync directory
function fx(){ function fx(){
cd $HOME/SYNC/ cd $HOME/SYNC/
if [ ! -d $2 ]; then
echo "dir $2 does not exists"
if read -q '?Do you want to create it (y/n)?'; then
mkdir $2
else
echo -e "\nalllrighty then, byyye"
return
fi
fi
if [ "$2" != "" ]; then if [ "$2" != "" ]; then
cd $2 cd $2
fi fi