9 ms·
Bash 4.4 released
- ramblenode 10y agoOne Readline feature I have been looking forward to: > c. The editing mode indicators can now be strings and are user-settable (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string' variables). Mode strings can contain invisible character sequences. Setting mode strings to null strings restores the defaults. So now I can get the prompt to change color depending on the mode!
- aidos 10y agoDo you know if you can change it when in insert mode vs normal mode? That's one of the things that stops me from working in vi mode in bash. EDIT I seem to have misread that description. So it is possible, that's brilliant news!
- pvdebbe 10y agoExcellent news. This is the one thing that zsh had and bash didn't. Well, among the things that I use...
- psibi 10y agoDoes that mean doing `Ctrl + R` can be colorized now just like how zsh does it ?
- 0942v8653 10y agoIt seems that this has not been fixed (or maybe I'm just doing something wrong?): https://lists.gnu.org/archive/html/bug-bash/2015-12/msg00031.html https://lists.gnu.org/archive/html/bug-bash/2015-12/msg00031... Edit: it looks like you must use \1 and \2 instead of \[ and \].
- nanis 10y agoReally, posting a link to `git.savannah.gnu.org/cgit/` was probably not a nice thing.
- okket 10y agoWhy? There is no official release posting I could find, not on the website, not on the mailing lists. ~~Also, cgit seems to cope with the traffic.~~ Edit: I see. Sorry. My browser was caching all requests to cgit. Please have the mods replace the link with something better. Meanwhile, please visit the link from _jomo: https://archive.is/n9Qb7 https://archive.is/n9Qb7
- sctb 10y agoThanks, we've updated the link from http://git.savannah.gnu.org/cgit/bash.git/plain/NEWS?id=a0c0a00fc419b7bc08202a79134fcd5bc0427071 http://git.savannah.gnu.org/cgit/bash.git/plain/NEWS?id=a0c0... to the release announcement.
- _jomo 10y agoArchive link: https://archive.is/n9Qb7 https://archive.is/n9Qb7
- abysmallyideal 10y agoCan we get a decent JIT or VM for bash lang, maybe it will help get rid of that systemd junk shitting all over my init.
- rickycook 10y agobecause a JIT and a VM is much less complicated than systemd further than that, the systemd vs sysv is a well and truly traveled road. do we really need to go down it again?
- abysmallyideal 10y agoHmm, well plugging into llvm is way better than systemd. This not a duopoly argument, there can be much better solutions than systemd that still retain sysv simplicity.
- startling 10y agothose things aren't equivalent, at all.
- coldtea 10y agoThat's an abysmal idea (pun intended). Besides, llvm vs systemd is not Apples to Oranges (after all those are both fruit and foods). It's Apples to TV remotes.
- abysmallyideal 10y agoYou obviously missed the point, even when identifying the incongruities of your assessment. Inspite of that, ANYTHING is better than systemd. edit: Having something like LLVM as a first class daemon, compared to something like systemd is not even comparable. It's like... evolution. systemd is like taking corporate backwash and trying to clean a pristine pond.
- coldtea 10y ago
- _jomo 10y ago> ll. Posix-mode shells now allow double quotes to quote the history expansion character. Yikes, finally you can use `echo "Hello World!"`
- etatoby 10y agoI never understood that feature. I have been putting `set +H` for decades on every profile of every system I touch.
- p4bl0 10y agoI really like this one: jj. New prompt string: PS0. Expanded and displayed by interactive shells after reading a complete command but before executing it. I currently use my PS1 for a lot of dirty things that would have their place in such a PS0 :). Now, I just have to wait until Bash 4.4 lands in Debian…
- pawadu 10y agoWait, how does this work again?
- HeadlessChild 10y agoSee you in Debian stable 10.
- voltagex_ 10y ago4.4rc2 is in experimental and 4.4 is likely to end up in -backports, so it's not all bad.
- raziel2p 10y agoLike what? Out of curiosity.
- p4bl0 10y agoI detailed some of these dirty things in an old (2011) blog post: https://shebang.ws/fast-window-switch-2-bash-tricks.html https://shebang.ws/fast-window-switch-2-bash-tricks.html
- CJefferson 10y agoYou could use PS0 to make your terminal title be "running <name of program>" when a program is running, then "directory <dir name>" when just on a prompt (that might be too busy for some people, but I'd like to know if a program is actively running in the terminal title).
- 10y ago
- erelde 10y agoCool stuff. Weird numbering though.
- atdt 10y ago> The shell now allows `time ; othercommand' to time null commands. Uh, what? Could someone explain this one, please?
- slipo 10y agoPre 4.4 - ';' (command separator) was ignored by time # time; echo hola -bash: syntax error near unexpected token `echo'
- etatoby 10y agoWhy would you want to time nothing? What does it output, real 0s user 0s system 0s?
- thiagoharry 10y agoWhy would you want to multiply by 1 or sum zero? You probably wouldn't need to do it, but computers and scripts aren't so smart as people and always follow code literally. For them is important a language having less irregularities and exceptional rules. If "" is a valid command and you have the syntax "time [COMMAND];", why not allow "time;"?
- sillysaurus3 10y agoIt might be to avoid errors for scripts like: time ${cmd}; foo where cmd happens to be unset. Conceptually, that's a valid script, because `time` standalone is a valid script. No reason it should generate an error.
- fosk 10y agoNot always the case, I just tried and: $ time real 0m0.002s user 0m0.000s sys 0m0.000s
- i4k 10y agoHolyshit! After four releases versions bash starts to get regular syntax?
- 0xmohit 10y agoI was led to think that Chet's bash page [0] might contain details about the 4.4 release. Unfortunately, not. (Chet Ramey [1] is the primary maintainer of GNU bash.) [0] https://tiswww.case.edu/php/chet/bash/bashtop.html https://tiswww.case.edu/php/chet/bash/bashtop.html [1] https://tiswww.case.edu/php/chet/ https://tiswww.case.edu/php/chet/
- pja 10y agoIt does now: https://tiswww.case.edu/php/chet/bash/NEWS https://tiswww.case.edu/php/chet/bash/NEWS This is a terse description of the new features added to bash-4.4 since the release of bash-4.3...
- i4k 10y ago> Bash now checks $INSIDE_EMACS as well as $EMACS > when deciding whether or > not bash is being run in a GNU Emacs shell window. hahaha Next release it will check the variables $INSIDE_ACME, $INSIDE_SUBLIME and $INSIDE_NOTEPADPLUSPLUS
- jxy 10y agoI don't think this is a good design decision either. Next release would probably check $INSIDE_SCREEN, $INSIDE_BROWSER, $INSIDE_PHONE, $INSIDE_VR, $INSIDE_PAPER, $INSIDE_HUMAN
- rgtk 10y agoBash and Emacs are under the same umbrella. This software is part of GNU system and systems tend to incorporate its part to make it more maintainable. However, more generic solution shall be used, like checking out parent process of current session to determine environment in which bash is running.
- i4k 10y agoThe problem is not only with bash, but with entire gnu ecosystem. Bash disable something ONLY when the parent process is EMACS is totally nonsense. Bash should check for some behavior, instead of some technology... because I'm sure other editors can behave similarly when executing bash inside some buffer. Doing software this way makes bash and emacs working well, but hard to make other softwares interact with both of them... Sublime, acme, micro, and so on can benefit of a better solution. In the same way, other shell should work fine inside emacs (M-x ansi-term). But software design is not expected here (see downvotes)
- pgl 10y agoThis may be a better link: http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00018.html http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00018....
- siteshwar 10y agoHere is the announcement on mailing list: http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00018.html http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00018.... http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00019.html http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00019....
- agentgt 10y agoo. There is a new address@hidden family of operators to transform the value of `parameter'. Can anyone show an example of that? I'm not sure I understand that feature.
- slipo 10y agoInteresting addition ${PARAMETER@OPERATOR} parameter expansion. Taken from the new docs, see: https://www.reddit.com/r/linux/comments/52z087/bash_44_released/ https://www.reddit.com/r/linux/comments/52z087/bash_44_relea...
- opk 10y agoI'm not sure how wise that is. It doesn't exactly lead to readable scripts. Zsh has had the equivalent feature with the syntax ${(operator)parameter) for over two decades so plenty of time for more operators to be added. It is very powerful but worse than perl for code that looks like line noise.
- db48x 10y agoIt was mangled by the anti-spam system, which does make it confusing to read.
- olau 10y agoA little anecdote: there was a case of O(N^2) in readline with long lines. Essentially a bug in the redisplay logic. It affected Bash, mysql/psql, Python, etc. After having suffered from this for some years, last year that annoyed me enough to start digging into readline to figure out what was causing it. In the end, that prompted Chet Ramey to come up with a fix which looks like it is now being released! I promised myself that when this one was fixed, I'd look into why most readline shells can go nuts when you resize them - somehow they don't always discover that the line width has changed.
- greenshackle 10y agoRelated? http://stackoverflow.com/questions/21947452/why-is-printing-b-dramatically-slower-than-printing?noredirect=1&lq=1 http://stackoverflow.com/questions/21947452/why-is-printing-...
- otabdeveloper1 10y agoThank you, thank you. You are my hero, for serious.
- JonathonW 10y ago> I promised myself that when this one was fixed, I'd look into why most readline shells can go nuts when you resize them - somehow they don't always discover that the line width has changed. Possibly related? > Use pselect(2), if available, to wait for input before calling read(2), so a SIGWINCH can interrupt it, since it doesn't interrupt read(2). (from the Readline-7.0 release notes)
- tambourine_man 10y agoOS X has been stuck in 3.2.57 for years due to licensing. I like being able to SSH into a fresh Linux box and feel at home, but at some point, they'll be so different that I might as well permanently switch to Zsh. I keep hoping for Apple to adopt Fish, last I heard the guy works there, and it's totally Apple's thing to have its own shell. It would be fun at least.
- hibbelig 10y agoI gave in and installed bash from Homebrew.
- mthoms 10y agoSame here. Wish I had done it sooner.
- mwpmaybe 10y agoHaving a, "Holy shit, why didn't I think of that?" moment over here. Thanks for the tip!
- zonkey 10y agoSo weird, I literally updated bash minutes before seeing this post about bash. I followed these instructions to enable it as default https://johndjameson.com/blog/updating-your-shell-with-homebrew/ https://johndjameson.com/blog/updating-your-shell-with-homeb...
- mieko 10y agoThis is what I do, and just so others know: Realize that if your personal account's shell is pointed into the homebrew installation in /usr/local, and you implode homebrew or wipe /usr/local, you won't be able to start a terminal until your shell is changed or the binary exists. Solving this without Terminal.app being able to launch is a minor annoyance.
- tambourine_man 10y ago
- smcdow 10y agoStill waiting on a formal way to denote namespaces in bash
- euphoria83 10y agoOne of the most important open-source projects in my view. Great work!