From 5f47884190091ff511dd1e838ad5794d0061b51c Mon Sep 17 00:00:00 2001 From: Julien Date: Wed, 30 Jan 2019 20:30:34 +0100 Subject: [PATCH 01/22] docs(vscode): rework settings --- tools/vscode.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/vscode.md b/tools/vscode.md index 77b4b71..53c7030 100644 --- a/tools/vscode.md +++ b/tools/vscode.md @@ -66,11 +66,7 @@ - `Wrap Console Log`: Wrap to console.log by word or selection. -############################################################################## - -# USER SETTINGS - -############################################################################## +## My Settings ```javascript { From b8cc65da798eb3cd4cbe10e3ba3f493c68d2f86a Mon Sep 17 00:00:00 2001 From: Julien Date: Wed, 30 Jan 2019 20:57:07 +0100 Subject: [PATCH 02/22] docs(vscode): add project manager extension --- tools/vscode.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/vscode.md b/tools/vscode.md index 53c7030..6121446 100644 --- a/tools/vscode.md +++ b/tools/vscode.md @@ -54,6 +54,8 @@ - `Output Colorizer`: Syntax Highlighting for log files. +- `Project Manager`: Easily switch between projects. + - `Prettier - Code formatter`: VS Code plugin for prettier/prettier. - `REST Client`: REST Client for Visual Studio Code. From 792127225d6fc711ec412ff0f99c30c6d5e4eea6 Mon Sep 17 00:00:00 2001 From: Julien Date: Wed, 30 Jan 2019 20:57:37 +0100 Subject: [PATCH 03/22] docs(vscode): reorder extensions alphabetically --- tools/vscode.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/vscode.md b/tools/vscode.md index 6121446..065fc76 100644 --- a/tools/vscode.md +++ b/tools/vscode.md @@ -54,10 +54,10 @@ - `Output Colorizer`: Syntax Highlighting for log files. -- `Project Manager`: Easily switch between projects. - - `Prettier - Code formatter`: VS Code plugin for prettier/prettier. +- `Project Manager`: Easily switch between projects. + - `REST Client`: REST Client for Visual Studio Code. - `SVG Viewer`: SVG Viewer for Visual Studio Code. From 9760107f157de5d1a8fe0a664dab20de268d2868 Mon Sep 17 00:00:00 2001 From: Julien Date: Fri, 1 Feb 2019 10:01:03 +0100 Subject: [PATCH 04/22] docs(vscode): add vue peek --- tools/vscode.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/vscode.md b/tools/vscode.md index 065fc76..0b95a83 100644 --- a/tools/vscode.md +++ b/tools/vscode.md @@ -64,6 +64,8 @@ - `Terminal`: Terminal for Visual Studio Code. +- `Vue Peek`: Allows peek and goto definition for Vue single-file components. + - `VS Live Share`: Real-time collaborative development from the comfort of your favorite tools. - `Wrap Console Log`: Wrap to console.log by word or selection. From 29819a501c7e0f0e59ae98f04e2d6ead4b11e9d4 Mon Sep 17 00:00:00 2001 From: Julien Date: Mon, 11 Feb 2019 15:15:57 +0100 Subject: [PATCH 05/22] docs(laravel): initialize cheatsheet --- README.md | 4 ++++ backend/laravel.php | 0 2 files changed, 4 insertions(+) create mode 100644 backend/laravel.php diff --git a/README.md b/README.md index 1264254..879c2a5 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,10 @@ Feel free to take a look. You might learn new things. They have been designed to #### Python +- [Laravel](backend/laravel.php) + +#### Python + - [Django](backend/django.py) #### Javascript diff --git a/backend/laravel.php b/backend/laravel.php new file mode 100644 index 0000000..e69de29 From 21a257f4cfab67c063b7b7ca084bca9dc0836f16 Mon Sep 17 00:00:00 2001 From: Julien Date: Fri, 15 Feb 2019 19:23:18 +0100 Subject: [PATCH 06/22] docs(laravel): CLI commands --- backend/laravel.php | 138 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) diff --git a/backend/laravel.php b/backend/laravel.php index e69de29..cb752f2 100644 --- a/backend/laravel.php +++ b/backend/laravel.php @@ -0,0 +1,138 @@ + Date: Mon, 18 Feb 2019 09:46:21 +0800 Subject: [PATCH 07/22] Update README.md ... --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 879c2a5..fde97f1 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Feel free to take a look. You might learn new things. They have been designed to
View cheatsheets -#### Python +#### PHP - [Laravel](backend/laravel.php) From dbb804db47f8acee97ddab26515957b76d0d2966 Mon Sep 17 00:00:00 2001 From: Julien Date: Tue, 19 Feb 2019 18:01:23 +0100 Subject: [PATCH 08/22] docs(vscode): add File Utils --- tools/vscode.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/vscode.md b/tools/vscode.md index 0b95a83..6c6ebd9 100644 --- a/tools/vscode.md +++ b/tools/vscode.md @@ -44,6 +44,8 @@ - `EditorConfig for VS Code`: EditorConfig Support for Visual Studio Code. +- `File Utils`: A convenient way of creating, duplicating, moving, renaming and deleting files and directories. + - `Final-Newline`: Inserts a final newline when saving the document. - `Formatting Toggle`: A VS Code extension that allows you to toggle the formatter (Prettier, Beautify, …) ON and OFF with a simple click. From 4476c4c068e98e54a9561422a5b667372a35d311 Mon Sep 17 00:00:00 2001 From: Julien Date: Tue, 19 Feb 2019 20:35:41 +0100 Subject: [PATCH 09/22] docs(vscode): add PHP IntelliSense --- tools/vscode.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/vscode.md b/tools/vscode.md index 6c6ebd9..32ee640 100644 --- a/tools/vscode.md +++ b/tools/vscode.md @@ -26,6 +26,10 @@ - `Vetur`: Vue tooling for VS Code. +### PHP + +- `PHP IntelliSense`: Advanced Autocompletion and Refactoring support for PHP. + ### Git - `Git History`: View git log, file history, compare branches or commits. From afad9d57c6f40c21bda5cfaecbb4fcddf64265d0 Mon Sep 17 00:00:00 2001 From: Julien Date: Tue, 19 Feb 2019 21:21:28 +0100 Subject: [PATCH 10/22] docs(vscode): Laravel Artisan --- tools/vscode.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/vscode.md b/tools/vscode.md index 32ee640..ccd1465 100644 --- a/tools/vscode.md +++ b/tools/vscode.md @@ -28,6 +28,8 @@ ### PHP +- `Laravel Artisan`: Laravel Artisan commands within Visual Studio Code. + - `PHP IntelliSense`: Advanced Autocompletion and Refactoring support for PHP. ### Git From bb2465e3182baefa3f6c324fbea0ae6be8664243 Mon Sep 17 00:00:00 2001 From: Julien Date: Tue, 19 Feb 2019 21:26:39 +0100 Subject: [PATCH 11/22] docs(vscode): add Better PHPUnit --- tools/vscode.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/vscode.md b/tools/vscode.md index ccd1465..02808e2 100644 --- a/tools/vscode.md +++ b/tools/vscode.md @@ -28,6 +28,8 @@ ### PHP +- `Better PHPUnit`: A better PHPUnit test runner. + - `Laravel Artisan`: Laravel Artisan commands within Visual Studio Code. - `PHP IntelliSense`: Advanced Autocompletion and Refactoring support for PHP. From c93d3ba9f87cf1bc40aeb11ca8b5b022fdba15f4 Mon Sep 17 00:00:00 2001 From: Julien Date: Tue, 19 Feb 2019 21:34:33 +0100 Subject: [PATCH 12/22] docs(vscode): add PHP CS Fixer --- tools/vscode.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/vscode.md b/tools/vscode.md index 02808e2..ddbc0c1 100644 --- a/tools/vscode.md +++ b/tools/vscode.md @@ -32,6 +32,8 @@ - `Laravel Artisan`: Laravel Artisan commands within Visual Studio Code. +- `PHP CS Fixer`: PHP CS Fixer extension for VS Code, php formatter, php code beautify tool. + - `PHP IntelliSense`: Advanced Autocompletion and Refactoring support for PHP. ### Git From 08338adb423399edcd75d98613efd4ed13d2d9af Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 24 Feb 2019 23:38:39 +0100 Subject: [PATCH 13/22] docs(readme): remove contribution companies --- README.md | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/README.md b/README.md index fde97f1..896e4cb 100644 --- a/README.md +++ b/README.md @@ -105,27 +105,3 @@ Feel free to take a look. You might learn new things. They have been designed to ## 🙌🏼 How to Contribute? You are more than welcome to contribute and build your own cheatsheet for your favorite programming language, framework or development tool. Just submit changes via pull request and I will review them before merging. - -## 🙏🏻 Contribution - - - - - - - - - -
- - - - - - - - - -
- -> 👋 Do you want your company to be listed there? Contribute with a cheatsheet for your favorite programming language, framework or development tool. From 94fe7a0acf7316f4aad5c0adaf8b458943f60f7c Mon Sep 17 00:00:00 2001 From: Julien Date: Thu, 7 Mar 2019 11:17:51 +0100 Subject: [PATCH 14/22] docs(vscode): add phpdoc-comment-vscode-plugin --- tools/vscode.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/vscode.md b/tools/vscode.md index ddbc0c1..5f51625 100644 --- a/tools/vscode.md +++ b/tools/vscode.md @@ -34,6 +34,8 @@ - `PHP CS Fixer`: PHP CS Fixer extension for VS Code, php formatter, php code beautify tool. +- `PHP Doc Comment VSCode Plugin`: Add phpdoc @param and @return tag for selected function signatures. + - `PHP IntelliSense`: Advanced Autocompletion and Refactoring support for PHP. ### Git From 29e2ad39adba6c3ad7cec4ee94c21f09da1935c0 Mon Sep 17 00:00:00 2001 From: Julien Date: Mon, 8 Apr 2019 09:24:15 +0200 Subject: [PATCH 15/22] docs(laravel): add sections --- backend/laravel.php | 73 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/backend/laravel.php b/backend/laravel.php index cb752f2..e296241 100644 --- a/backend/laravel.php +++ b/backend/laravel.php @@ -2,7 +2,7 @@ /******************************************************************************************** * 1. CLI AVAILABLE COMMANDS FOR ARTISAN - * https://laravel.com/docs/5.7/artisan + * https://laravel.com/docs/5.8/artisan ********************************************************************************************/ // 1.1. MAIN. @@ -136,3 +136,74 @@ php artisan vendor:publish // Publish any publishable assets from vendor p php artisan view:cache // Compile all of the application's Blade templates php artisan view:clear // Clear all compiled view files + +/******************************************************************************************** + * 2. REQUEST + * https://laravel.com/api/5.8/Illuminate/Http/Request.html + * https://laravel.com/docs/5.8/requests + ********************************************************************************************/ + + + +/******************************************************************************************** + * 3. RESPONSE + * https://laravel.com/api/5.8/Illuminate/Http/Response.html + * https://laravel.com/docs/5.8/responses + ********************************************************************************************/ + + + +/******************************************************************************************** + * 4. ROUTING + * https://laravel.com/docs/5.8/routing + ********************************************************************************************/ + + + + /******************************************************************************************** + * 5. MIDDLEWARE + * https://laravel.com/docs/5.8/middleware + ********************************************************************************************/ + + +/******************************************************************************************** + * 6. CONTROLLERS + * https://laravel.com/docs/5.8/controllers + ********************************************************************************************/ + + + +/******************************************************************************************** + * 7. SESSION + * https://laravel.com/docs/5.8/session + ********************************************************************************************/ + + + +/******************************************************************************************** + * 8. URL GENERATION + * https://laravel.com/docs/5.8/urls + ********************************************************************************************/ + + + +/******************************************************************************************** + * 9. VALIDATION + * https://laravel.com/docs/5.8/validation + ********************************************************************************************/ + + + +/******************************************************************************************** + * 10. ERROR HANDLING + * https://laravel.com/docs/5.8/errors + ********************************************************************************************/ + + + +/******************************************************************************************** + * 11. LOGGING + * https://laravel.com/docs/5.8/logging + ********************************************************************************************/ + + From e5d1451172a9e96ba916706aff4b0d91f573060e Mon Sep 17 00:00:00 2001 From: Manoj Tyagi <38884133+neo-0224@users.noreply.github.com> Date: Wed, 10 Apr 2019 16:23:33 +0530 Subject: [PATCH 16/22] Doctype description added --- frontend/html5.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/html5.html b/frontend/html5.html index e1691ba..fc58d2a 100644 --- a/frontend/html5.html +++ b/frontend/html5.html @@ -6,7 +6,7 @@ - + From 4e10d483d311bc6bc11b4a64ca1d3a7e732d6a93 Mon Sep 17 00:00:00 2001 From: Ryan Febriansyah <15523163@students.uii.ac.id> Date: Thu, 11 Apr 2019 04:15:52 +0700 Subject: [PATCH 17/22] updated django-admin command --- backend/django.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/django.py b/backend/django.py index 42895ed..3cc384c 100644 --- a/backend/django.py +++ b/backend/django.py @@ -48,3 +48,5 @@ django-admin startapp # create a new django application with django-admin migrate # synchronize the database state with your current state project models and migrations django-admin makemigrations # create new migrations to the database based on the changes detected in the models django-admin runserver # start the development webserver at 127.0.0.1 with the port 8000 +django-admin help # display usage information and a list of the commands provided by each application +django-admin version # display the current django version From 461ae708cc9870969d22164b86db9311d85f177d Mon Sep 17 00:00:00 2001 From: HemendraKhatik <37813372+HemendraKhatik@users.noreply.github.com> Date: Sat, 13 Apr 2019 04:19:28 +0530 Subject: [PATCH 18/22] Update html5.html --- frontend/html5.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/html5.html b/frontend/html5.html index fc58d2a..e40173c 100644 --- a/frontend/html5.html +++ b/frontend/html5.html @@ -6,8 +6,8 @@ - - + + From c396e8470c6b0d36fb4d932559be720db6eb0ce6 Mon Sep 17 00:00:00 2001 From: Julien Date: Wed, 24 Apr 2019 18:54:25 +0200 Subject: [PATCH 19/22] docs(laravel): http tests assertions --- backend/laravel.php | 172 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) diff --git a/backend/laravel.php b/backend/laravel.php index e296241..70d128a 100644 --- a/backend/laravel.php +++ b/backend/laravel.php @@ -207,3 +207,175 @@ php artisan view:clear // Clear all compiled view files ********************************************************************************************/ +/******************************************************************************************** + * 12. COLLECTIONS + * https://laravel.com/docs/5.7/collections + ********************************************************************************************/ + + +all +average +avg +chunk +collapse +combine +concat +contains +containsStrict +count +crossJoin +dd +diff +diffAssoc +diffKeys +dump +each +eachSpread +every +except +filter +first +firstWhere +flatMap +flatten +flip +forget +forPage +get +groupBy +has +implode +intersect +intersectByKeys +isEmpty +isNotEmpty +keyBy +keys +last +macro +make +map +mapInto +mapSpread +mapToGroups +mapWithKeys +max +median +merge +min +mode +nth +only +pad +partition +pipe +pluck +pop +prepend +pull +push +put +random +reduce +reject +reverse +search +shift +shuffle +slice +some +sort +sortBy +sortByDesc +sortKeys +sortKeysDesc +splice +split +sum +take +tap +times +toArray +toJson +transform +union +unique +uniqueStrict +unless +unlessEmpty +unlessNotEmpty +unwrap +values +when +whenEmpty +whenNotEmpty +where +whereStrict +whereBetween +whereIn +whereInStrict +whereInstanceOf +whereNotBetween +whereNotIn +whereNotInStrict +wrap +zip + + +/******************************************************************************************** + * 13. HTTP TESTS + * https://laravel.com/docs/5.7/http-tests + ********************************************************************************************/ + + +$response->assertStatus($code); // Assert that the response has a given code. +$response->assertForbidden(); // Assert that the response has a forbidden status code. +$response->assertNotFound(); // Assert that the response has a not found status code. +$response->assertOk(); // Assert that the response has a 200 status code. +$response->assertSuccessful(); // Assert that the response has a successful status code. +$response->assertRedirect($uri); // Assert that the response is a redirect to a given URI. + +$response->assertHeader($headerName, $value = null); // Assert that the given header is present on the response. +$response->assertHeaderMissing($headerName); // Assert that the given header is not present on the response. + +$response->assertExactJson(array $data); // Assert that the response contains an exact match of the given JSON data. +$response->assertJson(array $data); // Assert that the response contains the given JSON data. +$response->assertJsonCount($count, $key = null); // Assert that the response JSON has an array with the expected number of items at the given key. +$response->assertJsonFragment(array $data); // Assert that the response contains the given JSON fragment. +$response->assertJsonMissing(array $data); // Assert that the response does not contain the given JSON fragment. +$response->assertJsonMissingExact(array $data); // Assert that the response does not contain the exact JSON fragment. +$response->assertJsonMissingValidationErrors($keys); // Assert that the response has no JSON validation errors for the given keys. +$response->assertJsonStructure(array $structure); // Assert that the response has a given JSON structure. +$response->assertJsonValidationErrors($keys); // Assert that the response has the given JSON validation errors for the given keys. + +$response->assertDontSee($value); // Assert that the given string is not contained within the response. +$response->assertDontSeeText($value); // Assert that the given string is not contained within the response text. +$response->assertSee($value); // Assert that the given string is contained within the response. +$response->assertSeeInOrder(array $values); // Assert that the given strings are contained in order within the response. +$response->assertSeeText($value); // Assert that the given string is contained within the response text. +$response->assertSeeTextInOrder(array $values); // Assert that the given strings are contained in order within the response text. + +$response->assertCookie($cookieName, $value = null); // Assert that the response contains the given cookie. +$response->assertCookieExpired($cookieName); // Assert that the response contains the given cookie and it is expired. +$response->assertCookieNotExpired($cookieName); // Assert that the response contains the given cookie and it is not expired. +$response->assertCookieMissing($cookieName); // Assert that the response does not contains the given cookie. +$response->assertPlainCookie($cookieName, $value = null); // Assert that the response contains the given cookie (unencrypted). + +$response->assertSessionHas($key, $value = null); // Assert that the session contains the given piece of data. +$response->assertSessionHasAll(array $data); // Assert that the session has a given list of values. +$response->assertSessionHasErrors(array $keys, $format = null, $errorBag = 'default'); // Assert that the session contains an error for the given field. +$response->assertSessionHasErrorsIn($errorBag, $keys = [], $format = null); // Assert that the session has the given errors. +$response->assertSessionHasNoErrors(); // Assert that the session has no errors. +$response->assertSessionDoesntHaveErrors($keys = [], $format = null, $errorBag = 'default'); // Assert that the session has no errors for the given keys. +$response->assertSessionMissing($key); // Assert that the session does not contain the given key. + +$response->assertViewHas($key, $value = null); // Assert that the response view was given a piece of data. +$response->assertViewHasAll(array $data); // Assert that the response view has a given list of data. +$response->assertViewIs($value); // Assert that the given view was returned by the route. +$response->assertViewMissing($key); // Assert that the response view is missing a piece of bound data. + +$this->assertAuthenticated($guard = null); // Assert that the user is authenticated. +$this->assertGuest($guard = null); // Assert that the user is not authenticated. +$this->assertAuthenticatedAs($user, $guard = null); // Assert that the given user is authenticated. +$this->assertCredentials(array $credentials, $guard = null); // $this->assertCredentials(array $credentials, $guard = null). +$this->assertInvalidCredentials(array $credentials, $guard = null); // Assert that the given credentials are invalid. From 7536d71c8da6b502190bd3583b9174be2e8db69f Mon Sep 17 00:00:00 2001 From: Julien Le Coupanec Date: Wed, 24 Apr 2019 23:44:54 +0200 Subject: [PATCH 20/22] =?UTF-8?q?docs(nanobox):=20update=20django=20by=20l?= =?UTF-8?q?aravel=20=F0=9F=8C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/nanobox_cli.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/nanobox_cli.sh b/tools/nanobox_cli.sh index 522fba2..dcabda4 100644 --- a/tools/nanobox_cli.sh +++ b/tools/nanobox_cli.sh @@ -99,7 +99,7 @@ nanobox version # Add a convenient way to access your app from the browser nanobox dns add local vue.dev -nanobox dns add local django.dev +nanobox dns add local laravel.dev # Run your app as you would normally, with Nanobox nanobox run npm run dev --host 0.0.0.0 @@ -116,7 +116,7 @@ nanobox info local # Add a DNS Alias to a dry-run app -nanobox dns add dry-run django.preview +nanobox dns add dry-run laravel.preview # Preview your app locally nanobox deploy dry-run From dd8dbbfe487f33802c3c4a807706b4b53449c82f Mon Sep 17 00:00:00 2001 From: Jintao Zhang Date: Sun, 21 Jul 2019 07:55:07 +0800 Subject: [PATCH 21/22] Add docker volume prune and docker network prune Signed-off-by: Jintao Zhang --- tools/docker.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/docker.sh b/tools/docker.sh index 3149392..a24f374 100644 --- a/tools/docker.sh +++ b/tools/docker.sh @@ -22,6 +22,8 @@ docker push username/repository:tag # Upload tagged image to registry docker run username/repository:tag # Run image from a registry docker system prune # Remove all unused containers, networks, images (both dangling and unreferenced), and optionally, volumes. (Docker 17.06.1-ce and superior) docker system prune -a # Remove all unused containers, networks, images not just dangling ones (Docker 17.06.1-ce and superior) +docker volume prune # Remove all unused local volumes +docker network prune # Remove all unused networks ############################################################################## From 1dfacb674a4d3ccc47c0c67b90a2a24467e28a54 Mon Sep 17 00:00:00 2001 From: Antonio Riccio Date: Thu, 1 Aug 2019 11:06:56 +0100 Subject: [PATCH 22/22] Corrected the bash cheatsheet - modified the condition to verify if two values are identical --- languages/bash.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/languages/bash.sh b/languages/bash.sh index ea2606e..866968b 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -219,12 +219,12 @@ statement1 || statement2 # or operator # STRINGS -str1 = str2 # str1 matches str2 -str1 != str2 # str1 does not match str2 -str1 < str2 # str1 is less than str2 (alphabetically) -str1 > str2 # str1 is greater than str2 (alphabetically) --n str1 # str1 is not null (has length greater than 0) --z str1 # str1 is null (has length 0) +str1 == str2 # str1 matches str2 +str1 != str2 # str1 does not match str2 +str1 < str2 # str1 is less than str2 (alphabetically) +str1 > str2 # str1 is greater than str2 (alphabetically) +-n str1 # str1 is not null (has length greater than 0) +-z str1 # str1 is null (has length 0) # FILES @@ -411,7 +411,7 @@ function errtrap { echo "ERROR line $1: Command exited with status $es." } -trap 'errtrap $LINENO' ERR # is run whenever a command in the surrounding script or function exits with non-zero status +trap 'errtrap $LINENO' ERR # is run whenever a command in the surrounding script or function exits with non-zero status function dbgtrap { echo "badvar is $badvar"