diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-27 14:02:05 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-27 14:02:05 +1300 |
commit | 853ac278289d0a92497a5189e2cb18a2b46482c5 (patch) | |
tree | 8b9028f9754d3ebe3b8ed9a6ffe50f946087a438 /sh | |
parent | Extend "fallback" prompt a bit (diff) | |
download | dotfiles-853ac278289d0a92497a5189e2cb18a2b46482c5.tar.gz dotfiles-853ac278289d0a92497a5189e2cb18a2b46482c5.zip |
s/exit/return/ in ex-subshell func
Diffstat (limited to 'sh')
-rw-r--r-- | sh/profile.d/options.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sh/profile.d/options.sh b/sh/profile.d/options.sh index a668a360..1a511d75 100644 --- a/sh/profile.d/options.sh +++ b/sh/profile.d/options.sh @@ -10,15 +10,15 @@ options() { shift # Directory already exists; bail out - [ -d "$dir" ] && exit + [ -d "$dir" ] && return # Create the directory and step into it - command -p mkdir -p -- "$dir" || exit - cd -- "$dir" || exit + command -p mkdir -p -- "$dir" || return + cd -- "$dir" || return # Write the program's --help output to a file, even if it's empty # This probably only works with GNU tools in general - "$prog" --help </dev/null >help 2>/dev/null || exit + "$prog" --help </dev/null >help 2>/dev/null || return # Iterate through remaining arguments (desired options), creating files to # show they're available if found in the help output |