Profile

Cover photo
Dag Odenhall
182 followers|6,077 views
AboutPosts+1's

Stream

Dag Odenhall
owner

Tips & Tricks  - 
 
Do you know about the kill ring?

CTRL-U - kill from the cursor to the start of the line
CTRL-K - kill from the cursor to the end of the line
CTRL-W - kill a "word" or "path component" behind the cursor
ALT-D - kill a whole word after the cursor

See also: help editor

Killing means deleting text and moving it to the kill ring.  This is a lot like the "cut" operation in graphical applications.  The kill ring is thus a bit like a clipboard, but with a twist: a log is kept of previous kills and you can "rotate" the kill ring to paste older entries.

CTRL-Y - paste the latest entry in the kill ring
ALT-Y - rotate the kill ring and change the latest paste

See also: help killring

Do you sometimes type a command, only to realize you need to run some other command first?  Perhaps you use CTRL-C to abort the current command line and type the new one?  Now you need to type the previous one all over again, as it's not in the history!  Perhaps you've resorted to CTRL-A # ENTER to comment out the commandline and put it in the history?  There's a better way!  Just hit CTRL-U, run the other command, then CTRL-Y to get back the previous commandline.  If you cluttered the kill ring while entering the other command, just rotate with ALT-Y until you get to the right one.

Bonus feature!  If you're running an X server, fish integrates the kill ring with the clipboard.  This means you can easily cut-and-paste from fish to graphical applications (for example CTRL-U in fish and then CTRL-V in the other application), and you can copy-and-paste from graphical applications to fish (CTRL-C in the other application, CTRL-Y in fish).

In fact, this isn't just convenient - it's more secure!  The following demo works with fish if you paste with the mouse or the terminal (for example CTRL-SHIFT-V in gnome-terminal), but if you paste with fish, that is with CTRL-Y, the evil command will be inserted into the commandline but not executed until you press ENTER:

Demo: http://thejh.net/misc/website-terminal-copy-paste

If you liked this post and would like me to write about more tips and tricks, let me know and get fish users you know to join this community.  It's something of an experiment to see if there's enough Google+ users interested in fish to invest any time in making this an active community rather than just a badge.
1
Add a comment...

Dag Odenhall

Shared publicly  - 
 
Hey +Christopher Done, are you still looking for a new e-reader?  Kobo has a new one with 265 dpi at a 1440 x 1080 resolution, maybe enough even for PDFs.  Supports both MOBI and EPUB.  #dowant   http://www.kobo.com/koboaurahd/techspecs/
1
Add a comment...

Dag Odenhall

Shared publicly  - 
 
“CERN experiments observe particle consistent with long-sought Higgs boson”
1
Add a comment...
Have him in circles
182 people
Ali Sajid Imami's profile photo
Michael Sloan's profile photo
David Himmelstrup's profile photo
Gleki Arxokuna's profile photo
Daniel Santa Cruz's profile photo
Shae Erisson's profile photo
John Lato's profile photo

Dag Odenhall

Shared publicly  - 
 
fish
Friendly Interactive SHell
View community
1
Add a comment...

Dag Odenhall

Shared publicly  - 
 
Write a long comment on Google+, switch window before posting.  Form gone.  Content gone.  Good thing I have a browser extension for form recovery then!  Wait, no, this javascript heavy web application with really crappy usability [for example Pg Up/Down never works to scroll here] breaks it somehow.  Browser doesn't even pick up on the textarea as a form control.  Let's see if I manage to post this before it disappears on me.  Google+, I hereby dub you Google-.
2
Ivan Miljenovic's profile photoDag Odenhall's profile photoChristopher Done's profile photo
8 comments
 
I'm not sure they're even overridden in this case, just broken by careless scripting.
Add a comment...

Dag Odenhall

Shared publicly  - 
 
 
This is desperately cute, makes me want a pet elephant.
Also makes me wonder whether elephants would enjoy facebook, or at least flash games.
3
Lindar Greenwood's profile photo
 
Cooooooool! Are they smarter than apes?
Add a comment...
People
Have him in circles
182 people
Ali Sajid Imami's profile photo
Michael Sloan's profile photo
David Himmelstrup's profile photo
Gleki Arxokuna's profile photo
Daniel Santa Cruz's profile photo
Shae Erisson's profile photo
John Lato's profile photo
Links
Basic Information
Gender
Male
Other names
donri
Dag Odenhall's +1's are the things they like, agree with, or want to recommend.
Mission Report
projectscoutess.blogspot.com

Well, that's the end of my GSoC project and I'm pleased to inform you that Scoutess was a success! While it hasn't been smooth sailing for e

YUI Library
yuilibrary.com

Nicholas Zakas: Progressive Enhancement 2.0 12 days ago. Nicholas Zakas, former Yahoo! engineer and author of several books about JavaScript

Harry Potter and the Methods of Rationality | Petunia married a professo...
hpmor.com

This is a mirror of Less Wrong's / Eliezer Yudkowsky's epic Harry Potter fanfic-in-progress, Harry Potter and the Methods of Rationa