Commit Graph

189 Commits

Author SHA1 Message Date
Andreas Nordal
a7664539c0 Fix: '?' and ';' must not be made into a string 2018-06-24 12:40:34 +02:00
Andreas Nordal
d43a95406f Rename is_controlcharacter → is_whitespace
Because ' ' is not a control character.
2018-06-24 10:31:49 +02:00
Andreas Nordal
062a4b64b2 Fix typo in syntax error msg 2018-06-14 23:08:58 +02:00
Andreas Nordal
36217be3df Merge branch 'split_source_nonatomically_to_preserve_history' 2018-06-14 23:04:27 +02:00
Andreas Nordal
bbce97387c Big source split 2018-06-14 22:56:56 +02:00
Andreas Nordal
43c6b544f2 Preparational breakage: Fool git to preserve as much history as possible 2018-06-14 22:56:56 +02:00
Andreas Nordal
636e853357 Kill unused argument warnings the right way 2018-06-11 22:17:55 +02:00
Andreas Nordal
f6372db0c8 how to: [[ 2018-06-10 22:41:40 +02:00
Andreas Nordal
1e31de2911 how to: String split redux 2018-06-08 00:56:36 +02:00
Andreas Nordal
302101437c moduletest: Correct error message after renaming 2018-06-06 21:19:48 +02:00
Andreas Nordal
88d527e6ec Cargoify moduletest 2018-06-06 00:46:35 +02:00
Andreas Nordal
addd0e0900 Merge branch 'move_source_nonatomically_to_preserve_history'
Apparently, git is stupid.

Fixes #19
2018-06-05 21:41:36 +02:00
Andreas Nordal
2c963f2234 mv shellharden.rs src/main.rs 2018-06-05 21:22:29 +02:00
Andreas Nordal
9bc5f409b7 rm src/main.rs 2018-06-05 21:21:58 +02:00
Andreas Nordal
4fc09b6a52 Cargo: Retrospectively bump version: 3.1 → 3.2 2018-06-05 20:58:36 +02:00
Andreas Nordal
5027decb56 how to: Improve intro 2018-06-05 00:39:15 +02:00
Andreas Nordal
28516e9751 how to: Fish compat 2018-06-05 00:39:15 +02:00
Andreas Nordal
f34d7e834d Quoting not needed inside double brackets
Fixes #8
2018-06-04 01:38:25 +02:00
Andreas Nordal
4ed8ac2e86 Parse control structures 2018-06-04 01:38:25 +02:00
Andreas Nordal
8b24cf5d2e Fix crash on unexpected EOF in heredoc
flush(1) when horizon.len() == 0
2018-06-04 01:38:25 +02:00
Andreas Nordal
dcf5fe3148 how to: Backtick: Add reference 2018-06-04 01:38:25 +02:00
Andreas Nordal
7a5a3d64f4 How to end a script 2018-05-28 02:21:37 +02:00
Andreas Nordal
5410f59ef4 how to do things: {} is a group command 2018-05-28 02:21:37 +02:00
Andreas Nordal
7abec07a2a Runnable tests
Fixes #15
2018-05-27 00:02:47 +02:00
Robert (Jamie) Munro
9b528ba3dc Apply --transform to tests and put in "expected" 2018-05-27 00:02:47 +02:00
Robert (Jamie) Munro
2bf7665580 Move tests into "original" subfolder 2018-05-27 00:02:47 +02:00
Andreas Nordal
8091171829 How to: Read needs errexit guard
Fixes #18
2018-05-26 22:38:24 +02:00
Andreas Nordal
f8f20762c6 how to do things: Nitpick on the later sections 2018-05-22 22:45:48 +02:00
Andreas Nordal
3c715be0d4 how to do things: Braces: Less absolute, explain concerns
Fixes #3
2018-05-20 18:26:39 +02:00
Andreas Nordal
68890c6fa6 how to do things: avoid invoking the shell with improper quoting 2018-05-19 15:40:33 +02:00
anordal
54a5156f21
Merge pull request #11 from ahmetb/patch-1
Show how to use local assignment with cmd
2018-05-18 00:01:21 +02:00
Ahmet Alp Balkan
8dca251fef
Update how_to_do_things_safely_in_bash.md 2018-05-17 14:05:12 -07:00
Andreas Nordal
5bdf8a0ebd Add option -h
Fixes #12
2018-05-17 22:26:47 +02:00
Ahmet Alp Balkan
88c431bd8e
Show how to use local assignment with cmd 2018-05-17 11:53:41 -07:00
Andreas Nordal
28c4144803 How to do things: Work around shellcheck false positive
Fixes #10.
2018-05-17 13:28:29 +02:00
Andreas Nordal
4743a59225 Make it build with Cargo
For packagers' sake, the old build command `rustc shellharden.rs`
shall continue to work until next release.
2018-05-17 12:35:15 +02:00
Andreas Nordal
7f67ebe06f How to do things: More open-ended on Almquist 2018-05-16 21:43:40 +02:00
Andreas Nordal
55cf1ccb82 How to do things: Why arrays are fundamental 2018-05-16 00:57:16 +02:00
Andreas Nordal
7717216e1e How to do things: Rm claim about posix and path to sh
No evidence of this in `man 3p system` or `man 1p make`
2018-05-15 21:58:17 +02:00
anordal
ece0788863
Merge pull request #6 from xyproto/point-of-no-return
Remove "return" and ";" for several functions
2018-05-15 19:03:36 +02:00
Andreas Nordal
bfd12fbca4 MPL 2.0 2018-05-15 18:57:10 +02:00
Andreas Nordal
3557b54912 --replace: Actually check if the file needs overwriting
This commit looks beautiful in `git show --ignore-space-change`.
2018-05-15 18:34:23 +02:00
Alexander F Rødseth
ee1044db53 Remove "return" and ";" for several functions
The code does the same thing, but is more elegant (IMO).

According to the top answer here, it's also considered good style, for Rust:
https://stackoverflow.com/questions/27961879/why-is-using-return-as-the-last-statement-in-a-function-considered-bad-style
2018-05-15 12:23:36 +02:00
Andreas Nordal
a1ecff6971 Add --check, --replace 2018-05-15 01:03:43 +02:00
Andreas Nordal
911c8ed78c How to do tings safely: Add preface, subsectionize first section 2018-05-13 15:09:25 +02:00
anordal
0663edf04f
Merge pull request #2 from MRSharff/master
Fixed a spelling mistake in how_to_do_things_safely_in_bash.md
2018-05-13 10:45:02 +02:00
Andreas Nordal
f678f211e1 How to do things safely: Change hashbang recommendation 2018-05-13 10:35:57 +02:00
Mat Sharff
967a033853 Fixed a spelling mistake in how_to_do_things_safely_in_bash.md 2018-05-12 23:22:37 -07:00
anordal
eb8ec5f411
Merge pull request #1 from Stratus3D/patch-1
Correct typo in the README.md and shellharden.rs
2018-05-12 23:54:24 +02:00
Trevor Brown
9e4f76d990
Fix typo in shellharden.rs 2018-05-12 15:49:21 -04:00