diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2015-09-14 17:55:03 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2015-09-14 17:55:03 +0200 |
commit | 48dbfe42f98ccc3fc17aad156d0f2be3e60e1407 (patch) | |
tree | 11f88b6f4f9392ba25bc43aeab7be0c5382daedf | |
parent | bc47110f52cd6390dc51b3a2df6adaa8d9dc9ab2 (diff) |
Shorten: __builtin__()
-rwxr-xr-x | nix-script-repl.sh | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/nix-script-repl.sh b/nix-script-repl.sh index ef8c80d..027dadc 100755 --- a/nix-script-repl.sh +++ b/nix-script-repl.sh @@ -109,13 +109,7 @@ __builtin__() { local cmd=$1; shift local args=$* - if [[ $COMMAND =~ $str ]] - then - $cmd $args && prompt - return 0 - else - return 1 - fi + [[ $COMMAND =~ $str ]] && $cmd $args && prompt } prompt |