:: OLD_SITE[]
Archived Shellcraft Daily tips and Weekly Challenge puzzles are stored here after the homepage moves on to new ones.
Archived Shellcraft Daily tips and Weekly Challenge puzzles are stored here after the homepage moves on to new ones.
Show or hide archived blocks. Pills match each section’s panel title below.
fc — Your Secret Command-Line Time Machine
Most people hammer ↑ (up arrow) or Ctrl+R to dig through history. There’s a more powerful built-in command that lets you edit and re-run any previous command in your favorite editor (vim, nano, etc.):
fc
fc and press Enter — it opens your last command in your
default editor ($EDITOR). Edit it, save, and exit — the shell runs the
modified version.
fc -l lists recent history with numbers, then
fc 123 edits command #123.
# Edit the last 3 commands at once
fc -3
# Use nano instead of vim this time
FCEDIT=nano fc
# Quickly fix a typo in the previous command without arrows
fc
One-liner to make it even better:
# Quick edit last command
alias fix='fc'
Now type fix whenever you mess something up.
> LEVEL_0: THE_VOID_PARADOX
> MISSION: PREDICT CONSOLE OUTPUT
const portal = [];
if (portal) {
if (portal == false) {
console.log("Empty yet Full");
} else {
console.log("The Void remains");
}
}
> Interactive check lives on the homepage for the current challenge.
> ANSWER (ARCHIVE)
Correct output: Empty yet Full
[] is truthy, but [] == false is true with loose equality, so the
inner branch runs.