How to map // to ~/?

2

Is it possible to remap ~/ to //?

I want to be able to do something like cat //something.txt and have it be running cat ~/something.txt

Or if this isn't possible, mapping ~ to something easier to type like perhaps just `

Thanks

Talon876

Posted 2012-05-11T22:25:25.247

Reputation: 123

Answers

0

In your ~/.inputrc, add:

$if Bash

"`": "~/"

$endif

Binding // is possible, but it can cause some confusion, since the first / wouldn't be shown on screen until the entire binding was entered.

user1686

Posted 2012-05-11T22:25:25.247

Reputation: 283 655

Also, // already has a defined meaning: It's equivalent to /, which you really don't want to override. – l0b0 – 2012-05-14T15:13:24.553