Give more context to the site for initial visitors. Its going to be more obvious to those who visited from HN but not to those who stumbled upon it somehow. A little blurb at the top saying this is a reference site for bash scripting syntax and maybe why you saw the need for such a thing would do ease people into the site a bit.
I hate the popup at the bottom, I will hesitate to use the site again because of that (just like many of us avoid news sites with pesky popups), Its a major turn-off. Probably an unpopular opinion around here, but just maybe make a note at the bottom regarding the privacy stuff unless there are legal reasons not to (I'm not up on all the regulations) If you can't avoid it, make it way less intrusive.
Overall its really nice and I love to see better documentation made around old-school linux/bash tools and syntax as I often feel the documentation can be unwieldy with a lot of knowledge assumed. +1 to examples as others have said. Keep it up! :)
I'll see if I can come with some non-disruptive way of adding some context to the site upon entering it.
For example "-e checks if files exists" How? -e filename ? This doesn't work?
test -e file
if [ -e file ]; then
echo "File exists!"
echo "File does not exist!"
As a nostalgic side note, I'm not even that old, and I miss when the Internet looked like this. Just regular folks learning HTML and writing about something they find interesting. These days, everything looks like it was built in a Wix or Squarespace factory.
This section is missing stuff like setuid, sticky bit, extended attributes, etc. (SELinux stuff and setgid? I'm not sure if there's more.) For example, `ls -ld /tmp` shows `drwxrwxrwt`, `ls -l /bin/sudo` shows `-rwsr-xr-x`.
> History Expansion
To this section, it might be good to add `!$`. Also maybe a quick overview on word designators, to cover syntax like `!:^`, `!:2`, `!:<asterisk>`, etc. There's also modifiers, like `!$:h` to return the (h)ead of a path that's the last argument of the previous command, etc.
> Bash Globbing
> @ Matches exactly one of a given pattern
It might be better to put these extended glob ones as @(pattern-list) for example, just like it is on the manpage. Putting it just like @ next to ? or <asterisk>, implies that it just goes like that alone.
> Overview of Bash Symbols
> $(( )) is used for saving the output of arithmetic.
I guess you could save it, but you can also pass it directly to where you need it. I wouldn't call `echo $(( 1 + 2 ))` saving it.
> $ deprecated integer expansion construct which is replaced by (( ))
No, it's replaced by `$(())`.
EDIT: Removed the part about the file types. You have that covered. However, you wrote
> c Special file
> b Block device
They're both special files. `c` is for character devices.
- There's a lot of info here, so I think you should aim for curation and conciseness, rather than completeness. For example, in File Test Operators, your first two entries (effectively, the first two entries a visitor sees) is `-e` and `-a`, both of which you describe as "File exists", though for the latter, you write: "(identical to -e but is deprecated and outdated)". Is there any reason for `-a` to be included if it's not useful? When I use a cheatsheet, I just want what's most useful, not a full historical reference.
- This is a minor thing, and very much imho, but it was a little distracting to see Times New Roman (or rather, the Mac default serif font) as the base font for the descriptive text, which is a font that I associate with an unstyled (i.e. unpolished) website. IMHO , it looks a bit better in Georgia, or a sans-serif like "Helvetica Neue". Again, just imho, I'm sure others might vehemently disagree.
- The associated twitter handle looks like @shellmagic1 – why not use the handle @shellmagicxyz, which is currently unused?
- I've added a bunch of new fonts to the site, just now. It's a temporary selection of fonts - but include nicer ones like Source Code Pro for code, and a sans-serif for headings and navigation bar.
- Thank you very much for mentioning that. That's a way nicer handle!
They did a 10% implementation of what would be good:
$ help [
[: [ arg... ]
Evaluate conditional expression.
This is a synonym for the "test" builtin, but the last argument must
be a literal `]', to match the opening `['.
So anyway, if this could all be fixed with a command-line utility, that would be wonderful. It is likely that if I ever need to remember what [ -e does, I'll "man [" or failing that "info bash" or failing that, give up and write the program in go so at least I can work from some documentation.
I realize a lot of folks consider the context switch to paper to also be jarring, but this is why I like analog reference works. I remember roughly how far in to the book the table of all those obscure flags are, and the book more or less falls open to it, because I've been there before.
Well, knowing that `[` is the same as `test`, you can `man test` to see the available options.
Personally, I avoid `[` for `[[`. To see the options for that, I do `man bash`, then type `/\[\[`, hit Enter, and press `n` a few times until the list of options appears. It's in the "CONDITIONAL EXPRESSIONS" section.
Almost everything shown in this site is available in bash's manpage.
GNU's `ls` has most of its documentation in `info ls`.
There's no need to turn to websites. All documentation is available locally from the command line. If anything, it just requires a bit of skill in searching. With `man`/`less`, you search with `/` like I showed; in `info`, you search with <Ctrl-s>.
Also, `command [ --help` does work. It's not the same as the built-in, but it should be mostly the same.
Heh, as a person who mostly writes Clojure code, I always find the context switch to go to the command line jarring and really really love tools that give me the documentation straight in my editor!
For all people like me addicted to this kind of reference websites full of information, check out http://hyperpolyglot.org/unix-shells (and all pages on http://hyperpolyglot.org/ actually).
My constructive or no so constructive criticism is that I really really don't like the theme. I find it really hard to look at and a bit difficult to read.
Thank you for the feedback and glad you like the content :-)
My 2 cents: top menu goes away when you reduce window width; on mobile no menu at all (but content goes one column correctly, so halfway responsive).
If you move or click on something, it highlights the cell (not everywhere) but there is no operation/command bound with that (no copy to clipboard or any kind of interaction).
Usually, something highlightening represents an action that user can do.
Joking aside, the bash man page is pretty good and well structured.
man bash | grep '^[A-Z]'
If I might suggest something: Maybe you'd like to investigate different layouts for different use cases? The alphabetical ordering of builtins e.g. will mainly help you if you encounter it, but don't know what it does.
For more exploratory/educational lookup attempts, perhaps it could be useful to group them together by their use? I'm fairly certain, for example, that grouping `cd` together with `pushd` and `popd` might help someone avoid some rather nasty bugs in their script. Maybe, even a "see also" in the direction of subshells could help (as `cd` only affects the commands in the subshell).
And, on a sidenote: Interestingly, one can find similar "lookup problems" all over the place. For instance, any good guide to morse code will show you an alphabetical list of codes (text -> morse code) as well as a morse tree (morse code -> text) :)
I don’t believe this is true. These aren’t expansions, but rather actual objects you can reference that point to cwd and cwd's parent.
You can tell because `echo .` doesn’t expand while `echo ~` does
If you ever want to add some useless splash for no reason, can I suggest one of these?
What do you mean by a simulator? I think perhaps that'd prove beyond my skill but the idea sounds interesting.
255* Exit status out of range
It was a bit tedious work I must admit.
I think there's a mistake in "Access Codes & Permissions", AFAIK (which is not much) the o stands for "others" and now "owner".
I tried fiddling with the colors in the inspector, if you increase the contrast you start to get something I would describe as burn-in, after images in vision of the lines of text. Very uncomfortable, I actually prefer it with lower contrast.
Also I'm loving the animated favicon.