:: OLD_SITE[]

Archived Shellcraft Daily tips and Weekly Challenge puzzles are stored here after the homepage moves on to new ones.

:: OLD_ARCHIVE_FILTER[]

Show or hide archived blocks. Pills match each section’s panel title below.

Topic

:: SHELLCRAFT (ARCHIVE)[]

:: SHELLCRAFT_DAILY · #1 > First Entry · shellcraft_daily.log

fc — Your Secret Command-Line Time Machine

The tip

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.):

Bash
fc

How to use it

  • Type 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.
  • Want a specific command? fc -l lists recent history with numbers, then fc 123 edits command #123.

Pro moves

Bash
# 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

Why this is elite

  • Perfect when you have a long, complex command with a small mistake.
  • No more re-typing giant one-liners.
  • Works in pure bash — no extra tools needed.
  • Feels like real sorcery once you get used to it.

Bonus · ~/.bashrc

One-liner to make it even better:

Bash
# Quick edit last command
alias fix='fc'

Now type fix whenever you mess something up.

:: WEEKLY_CHALLENGE (ARCHIVE)[]

> 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.