Earlier quoted context omitted.
I have the following set in my .cshrc: setenv LC_ALL en_US.UTF-8 setenv LC_COLLATE C # use the ASCII sort order What have I broken, and how badly?
This won't work because LC_ALL overrides LC_COLLATE (and all the LC_* variables actually). It's LANG that you want to use. LANG is overriden by LC_* which are in turn overriden by LC_ALL. Don't use LC_ALL in your config files, use it only for one shot command lines or in scripts that need to be sure of the environment they run in.
The Art of Command Line
101–110 of 134 posts
Re: The Art of Command Line
#102Re: The Art of Command Line
#103Earlier quoted context omitted.
Can you share a little more info about this? I tried it but found it rather confusing. Also, for more readline maneuvers: http://unix.stackexchange.com/questions/21788/how-to-delete-...
`set -o vi` allows us to use `vi` bindings instead of the default `emacs` bindings. The way to think about it is that the prompt starts out in `vi insert mode` so whatever we type in will just be inserted at the prompt. However, we can hit the`Escape` key and move into `vi normal mode` where the keys are interpreted as normal `vi` commands. So, for example, once we hit `esc` we can navigate around the line using `h`…
Re: The Art of Command Line
#104One really useful shortcut I learned in bash is Ctrl-/ which is a sort of undo for bash when composing a command. Can't really explain how it works, you should try it out yourself. Also really handy is Ctrl-Y, which pastes the last cut characters by Ctrl-W, Ctrl-U or Ctrl-K.
Re: The Art of Command Line
#105No mention of autojump? :-p
Re: The Art of Command Line
#106So this is tangentially related by why do people seem to push Vi? Nano is a perfectly serviceable editor. If I need to do extensive editing I always end up loading it into Atom, Sublime or some other editor anyway. I've never really had to use a console editor for more than 10s of lines.
Re: The Art of Command Line
#107So this is tangentially related by why do people seem to push Vi? Nano is a perfectly serviceable editor. If I need to do extensive editing I always end up loading it into Atom, Sublime or some other editor anyway. I've never really had to use a console editor for more than 10s of lines.
In modern Bourne shell derivatives (Bash, ksh, some POSIX shells), the command: set -o emacs Will give command line editing bindings compatible with Emacs (which is also the default editing keys in MS-Windows and many IDE's BTW). HTH
Re: The Art of Command Line
#108Re: The Art of Command Line
#109Earlier quoted context omitted.
or if you learn emacs you have emacs shortcuts by default in shells. which goes against his childish comment on emacs: > Learn Vim (vi). There's really no competition for random Linux editing (even if you use Emacs, a big IDE, or a modern hipster editor most of the time).
At first I thought the same as you, but then I realised that he's not talking about your average editor, but about which editor to use if you SSH into a random web server etc. The thing you use in a foreign environment. That's what "random Linux editing" probably means.
Re: The Art of Command Line
#110Another one for obscure but useful: jot # print 10 values from 1 to 10, with leading zeros: for n in `jot -w "%04d" 10 1 10`; do echo $n; done
Just use Bash's builtin things: for n in {0001..0010}; do echo ${n}; done