Skip to content

Commit

Permalink
feat: add error handling to c function
Browse files Browse the repository at this point in the history
Signed-off-by: vladislav doster <10052309+vladdoster@users.noreply.github.com>
  • Loading branch information
vladdoster authored Aug 21, 2023
1 parent 1a66d2a commit 284c650
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion zsh/.config/zsh/functions/c
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#autoload

builtin cd ~/code/$1
if [[ -d $HOME/code ]]; then
builtin cd "$HOME/code/$1"
command ls
return 0
else
print "Error: ${HOME}/code directory does not exist"
return 1
fi

0 comments on commit 284c650

Please sign in to comment.