WeSearch

A shell colon does nothing. Use it anyway

https://lobste.rs/~refp· ·1 min read · 0 reactions · 0 comments · 2 views
#shell#colon#does#nothing#anyway
A shell colon does nothing. Use it anyway
TL;DR · WeSearch summary

I use the null command all the time when I start typing something out but still want it in the history so I don't have to type it out again. Jump to the start of the line, add a colon, enter to put it in history and then do whatever else you were going to do, and later on jump back and just remove the first character to actually run it. I never thought of using it for the side effect of evaluating the arguments though, that's clever!

Key facts
About this source

Comments - RSS 2.0 files mainly under programming. We currently carry 20 of its stories.

Original article
Lobsters · https://lobste.rs/~refp
Read full at Lobsters →
Opening excerpt (first ~120 words) tap to expand

I use the null command all the time when I start typing something out but still want it in the history so I don't have to type it out again. Jump to the start of the line, add a colon, enter to put it in history and then do whatever else you were going to do, and later on jump back and just remove the first character to actually run it. I never thought of using it for the side effect of evaluating the arguments though, that's clever!

Excerpt limited to ~120 words for fair-use compliance. The full article is at Lobsters.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from Lobsters