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

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.

| improve this answer | |
  • Also, // already has a defined meaning: It's equivalent to /, which you really don't want to override. – l0b0 May 14 '12 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.