logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Control Function Return - Exit Early | Online Free DevTools by Hexmos

Control function return with this simple command. Exit functions early and specify return values in shell scripts. Free online tool, no registration required.

return

Exit a function or a script if run with source. More information: https://www.gnu.org/software/bash/manual/bash.html#index-return.

  • Exit a function prematurely:

{{func_name}}() { {{echo "This is reached"}}; return; {{echo "This is not"}}; }

  • Specify the function’s return value:

{{func_name}}() { return {{exit_code}}; }

See Also