Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

it looks a lot more annoying to type. Would be an easy shell alias or script though, if one prefers that command style.


sort by: page size:

I wish I had something like this without it replacing the shell prompt with `>`.

This seems pretty cool. Not sure if I will remember to use it but might work better than a txt file I keep handy. Though for my most common annoyingly long commands I normally create an alias.

The improvement is that piping commands together doesn't require tedious text-munging while the console output looks basically the same. Which I think you could have figured out if you thought a little harder before jumping to snark.

Or you could just press Command + N.

Exactly, that is the point. Also, some commands require several parameters and it's much better having the script asking for those parameters in an interactive way.

For example: mac ssh:download-folder


You still have to press Enter.

I'm with you. I can't see myself preferring this over using my shell's interactive prompt, history, and a use of head/less at the end.

Thanks to the author and OP for sharing and it's good for other people if they find this useful, though.

EDIT: Maybe I could find this useful when the command that provides `up`'s input is not something that can be repeated for the same input. But even then, you can put it in the background with its output redirected to a file, then make the command that you would build inside `up` from a pipe like `tail -fn+1 bg-job.out | cmd`.


sure, but it'd be less confusing to just make it a new command. you could add features like invoking lsblk with a sensible set of flags.

The only thing I would fix is the "lengthy" part. I want it to be a simple command (I suppose I could wrap it or alias it), but other than that it sounds perfect.

Backticks if lazy, parenthetical for complicated command lines.

I realize that I have been using shell scripts for this. I just copy-paste commands and add a selector. It has the benefit that I didn't need to learn a new syntax.

I feel like you could replace this tool with a hotkey that runs the current command without clearing the line, sort of ”what if I ran this as is”

He means speaking commands (to a shell I presume) rather than type them.

More power to those who enjoy writing control flow in shell, but if I need anything beyond a single line I'm going with an interactive ipython session.

I know I could do it with a pretty straightforward script, but it's not as simple as a ctrl+f, and it requires me being on a machine w/ unix tools (i.e. not a PC or mobile device).

I was going to say the ability to Pipe commands but I guess that'd be a bit useless without the ability to type them.

Better than that for me is "Alt+.", much easier to type. It can be also combined with number like "Alt+2+." will insert second argument. Similarly "Alt+0+." will insert last command. http://linuxcommando.blogspot.in/2009/05/more-on-inserting-a...

Yes and isn't it fun to type that in over and over - especially on a new machine where you don't have your .dotfiles yet :-/ The new command is going to really save hassle here.

Or just add ‘echo’ in front: echo rm ... . Especially when the command is in a loop of some sort.

Another small step at making the command line more user friendly.
next

Legal | privacy