Earlier quoted context omitted.
The problem with installing zch on my desktop is that I won't have it on the servers I SSH into. I need to know the proper spells and incantations that will work on a wide variety of distros and versions, many of which I don't personally maintain. Therefore, bash.
Indeed. The same argument applies to other exotic tooling, interesting vim plugins with many dependencies, etc. It's one reason to keep one's environment relatively standard and boring. Otherwise, one comes to be dependent -- psychologically, at least -- on one's meticulously configured custom environment, and either chafes at its absence elsewhere or spends a great deal of time copying it everywhere.
Mastering Bash and Terminal
171–180 of 186 posts
Re: Mastering Bash and Terminal
#172Personally, I found the following to be extremely easy and powerful. A no-brainer that should be a bash default really. if [ -t 1 ] then # search for commands that start off with the same characters already typed bind '"\e[A":history-search-backward' bind '"\e[B":history-search-forward' fi One of my friends also recommended version-controlling your config files and storing them on gitlab, which I'm only sad I didn't…
I'm sorry, can you explain how to use this?
Re: Mastering Bash and Terminal
#173Earlier quoted context omitted.
Indeed. The same argument applies to other exotic tooling, interesting vim plugins with many dependencies, etc. It's one reason to keep one's environment relatively standard and boring. Otherwise, one comes to be dependent -- psychologically, at least -- on one's meticulously configured custom environment, and either chafes at its absence elsewhere or spends a great deal of time copying it everywhere.
I must admit guilt to dragging my .vimrc and sometimes the whole of ~/.vim/ into machines that I'll be SSHing into for only a short time.
Re: Mastering Bash and Terminal
#174Alt-l converts next word to lowercase
Alt-u converts next work to uppercase
Re: Mastering Bash and Terminal
#175Earlier quoted context omitted.
zsh was even the default shell for an OS X release, 10.3 or 4 can't remember at this point.
Nope, before switching to bash in 10.3, tcsh was the OS X default.
Re: Mastering Bash and Terminal
#176Earlier quoted context omitted.
Also, when you use a lot of scripts that only work with bash (there are more than you'd expect, despite zsh saying it is bash compatible) then you have the choice of either rewriting these scripts or using bash. Most ppl will choose not to rewrite.
zsh never claimed it was compatible with bash. I'm not sure where you got that impression from. Maybe you're thinking of sh -- the bourne shell -- which zsh is in fact compatible with (as long as you limit your scripts to the bourne shell subset of zsh).
Anyways. The core point is that compatibility often means compatible in 90%-99% of the cases. It's really really hard to be 100% compatible, which also requires one to emulate bugs etc.
Re: Mastering Bash and Terminal
#177Instead of ctrl-z and bg why not just do # & to push it to the background.
Re: Mastering Bash and Terminal
#178Great post & thread, a tl;dr: Ctrl-r search history - then Ctrl-r again to show next match - then Tab to show all options Ctrl-p previous command or arrow up Ctrl-n next command or arrow down export HISTCONTROL=ignoreboth:erasedups Add to .bashrc to avoid duplicate entries Ctrl-a to beginning of line Ctrl-e to end of line Alt-b one word back Alt-f one word forward Ctrl-k delete to end of line Ctrl-u delete to beginni…
There is Ctrl-y for pasting deleted strings, which goes along very well with these commands: Ctrl-k delete to end of line Ctrl-u delete to beginning of line Alt-d delete to end of word Ctrl-w delete to beginning of word Alt-Backspc same Bash keybindings behave like Emacs by default, hence every time you invoke one of these, it will put the string into a buffer, which can be later pasted using Ctrl-y. This is very use…
"\e[A": history-search-backward
"\e[B": history-search-forward
These have to go in `~/.inputrc`, right?Re: Mastering Bash and Terminal
#179Earlier quoted context omitted.
It's easier to embrace the Unix philosophy when your text editor doesn't take a half hour to start.
It has a daemon mode, so now you know. And from a flat start emacs takes less than 5 seconds on my pc which isn't that beefy.
Re: Mastering Bash and Terminal
#180Earlier quoted context omitted.
It has a daemon mode, so now you know. And from a flat start emacs takes less than 5 seconds on my pc which isn't that beefy.
I was replying with a glib remark because the suggestion to use emacs instead was stupid to begin with.