From 296c5a32c7cf86d94ce46aef892b1fb664e0f7ac Mon Sep 17 00:00:00 2001
From: Benno Schulenberg
- 4.1. How do I open a file with a name beginning with '+' from the command line?
+ 4.1. Alt+Up does nothing on a Linux console. How can I make it work?
4.2. How can I make Ctrl+Shift+Left/Right select words on urxvt?
4.3. Ack! My numeric keypad's keys don't work properly when NumLock is off! What can I do?
4.4. With what keystroke can I paste text from the clipboard into nano?
@@ -175,13 +175,14 @@
4. Running
-4.1. How do I open a file with a name beginning with '+' from the command line?
-+If a command-line argument that begins with '+' is followed by another argument, the former is always treated as a starting line (plus column number), and the latter always as a filename. If a command-line argument that begins with '+' isn't followed by another argument, it's treated as a filename. Examples:
-To open '+filename.txt': nano +filename.txt
- To open '+filename.txt' starting on line 10: nano +10 +filename.txt
- To open '+filename.txt' starting on line 1, column 20: nano +,20 +filename.txt
- To open '+filename.txt' starting on line 10, column 20: nano +10,20 +filename.txt
- To open '+filename.txt' starting on line 1 and 'filename.txt' starting on line 40: nano +1 +filename.txt +40 filename.txt4.1. Alt+Up does nothing on a Linux console. How can I make it work?
+On Debian and its derivatives, the Alt+Up keystroke on a Linux console + produces by default a 'KeyboardSignal', which normally does absolutely nothing and is useless + for the average user. To get the keystroke to work normally, run this in a Linux console:
+ dumpkeys --full | sed s/KeyboardSignal/Up/ | sudo loadkeys - +You will need to run this command whenever you first switch to a Linux console. + Or you can put the command in your .bashrc or equivalent, conditionalized with: + if [ $TERM == linux ]; then ... ; fi.
4.2. How can I make Ctrl+Shift+Left/Right select words on urxvt?
The urxvt terminal emulator produces non-standard escape sequences for the modified cursor keys. These deviant sequences are not listed in the terminfo database, which means that ncurses does not recognize them. The easiest way around this is to tell urxvt to produce xterm-compatible escape sequences for the relevant keystrokes. To achieve this, add the following lines to your ~/.Xresources file: