Re: git bash_completion does not work - solved (?)
On 20 Jul 2012, at 16:08, Clemens Lang wrote: On Fri, Jul 20, 2012 at 09:56:24AM -0500, Ryan Schmidt wrote: I am still not sure what to change or how to verify it was successful. In Lion's Terminal.app, I have opened Preferences - Settings - Shell, checked the Run command box, and filled in /opt/local/bin/bash -l. The Run inside shell checkbox is not checked. The bash port is installed. If I open a new terminal window and type echo $SHELL it still prints /bin/bash. Is that a correct way to verify that these steps were not successful? What else should I be doing? Try echo $BASH_VERSION. It should print something along the line of 4.2.something. If it doesn't you're not using MacPorts bash. I upgraded my system this morning and I now have: bash @4.2.29_0+universal (active) bash-completion @2.0_1 (active) I ran the following: gbs:~ $ echo $BASH_VERSION 3.2.48(1)-release gbs:~ $ /bin/bash --version GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0) gbs:~ $ which bash /opt/local/bin/bash gbs:~ $ bash --version GNU bash, version 4.2.29(2)-release (i386-apple-darwin10.8.0) The results disagree with what Clemens said. Typing 'port SPACE TAB' gives me a listing of the current directory whereas it should give a list of all possible port commands if bash-completion is working. How can I get $BASH_VERSION to give '4.2.29(2)-release'? Barrie. ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Re: git bash_completion does not work - solved (?)
On Jul 21, 2012, at 04:53, Barrie Stott wrote: On 20 Jul 2012, at 16:08, Clemens Lang wrote: On Fri, Jul 20, 2012 at 09:56:24AM -0500, Ryan Schmidt wrote: I am still not sure what to change or how to verify it was successful. In Lion's Terminal.app, I have opened Preferences - Settings - Shell, checked the Run command box, and filled in /opt/local/bin/bash -l. The Run inside shell checkbox is not checked. The bash port is installed. If I open a new terminal window and type echo $SHELL it still prints /bin/bash. Is that a correct way to verify that these steps were not successful? What else should I be doing? Try echo $BASH_VERSION. It should print something along the line of 4.2.something. If it doesn't you're not using MacPorts bash. I upgraded my system this morning and I now have: bash @4.2.29_0+universal (active) bash-completion @2.0_1 (active) I ran the following: gbs:~ $ echo $BASH_VERSION 3.2.48(1)-release gbs:~ $ /bin/bash --version GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0) gbs:~ $ which bash /opt/local/bin/bash gbs:~ $ bash --version GNU bash, version 4.2.29(2)-release (i386-apple-darwin10.8.0) The results disagree with what Clemens said. But have you actually followed the instructions from earlier in this thread about how to change your shell from /bin/bash to /opt/local/bin/bash? You need to do that first. ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Re: git bash_completion does not work - solved (?)
On 21 Jul 2012, at 11:07, Ryan Schmidt wrote: On Jul 21, 2012, at 04:53, Barrie Stott wrote: On 20 Jul 2012, at 16:08, Clemens Lang wrote: On Fri, Jul 20, 2012 at 09:56:24AM -0500, Ryan Schmidt wrote: I am still not sure what to change or how to verify it was successful. In Lion's Terminal.app, I have opened Preferences - Settings - Shell, checked the Run command box, and filled in /opt/local/bin/bash -l. The Run inside shell checkbox is not checked. The bash port is installed. If I open a new terminal window and type echo $SHELL it still prints /bin/bash. Is that a correct way to verify that these steps were not successful? What else should I be doing? Try echo $BASH_VERSION. It should print something along the line of 4.2.something. If it doesn't you're not using MacPorts bash. I upgraded my system this morning and I now have: bash @4.2.29_0+universal (active) bash-completion @2.0_1 (active) I ran the following: gbs:~ $ echo $BASH_VERSION 3.2.48(1)-release gbs:~ $ /bin/bash --version GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0) gbs:~ $ which bash /opt/local/bin/bash gbs:~ $ bash --version GNU bash, version 4.2.29(2)-release (i386-apple-darwin10.8.0) The results disagree with what Clemens said. But have you actually followed the instructions from earlier in this thread about how to change your shell from /bin/bash to /opt/local/bin/bash? You need to do that first. I have now edited /etc/shells with MacVim to add /opt/local/bin/bash as the first in the list. I then ran 'chsh -s /opt/local/bin/bash'. I had already done what you suggested in Terminal's Preferences - Settings - Shell. I removed all terminals, opened a new one and typed 'echo $BASH_VERSION'. The result was the same as before: 3.2.48(1)-release. What have I missed? Barrie. ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Re: git bash_completion does not work - solved (?)
I have now edited /etc/shells with MacVim to add /opt/local/bin/bash as the first in the list. I then ran 'chsh -s /opt/local/bin/bash'. I have done this on my system, too, and it works fine for me. I had already done what you suggested in Terminal's Preferences - Settings - Shell. I removed all terminals, opened a new one and typed 'echo $BASH_VERSION'. The result was the same as before: 3.2.48(1)-release. What have I missed? Try resetting your Terminal preferences to the default. It should use /usr/bin/login then, which should start the shell you chose via chsh. -- Clemens Lang ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Re: git bash_completion does not work - solved (?)
On 21 Jul 2012, at 12:01, Clemens Lang wrote: I have now edited /etc/shells with MacVim to add /opt/local/bin/bash as the first in the list. I then ran 'chsh -s /opt/local/bin/bash'. I have done this on my system, too, and it works fine for me. I had already done what you suggested in Terminal's Preferences - Settings - Shell. I removed all terminals, opened a new one and typed 'echo $BASH_VERSION'. The result was the same as before: 3.2.48(1)-release. What have I missed? Try resetting your Terminal preferences to the default. It should use /usr/bin/login then, which should start the shell you chose via chsh. Nearer in that there's more info and it half works. I ticked 'Run command' in Terminal's Preferences and entered /usr/bin/login. Deleted all terminals (does this need doing?) and opened a new one. Same as before for 'echo $BASH_VERSION'. Typed 'bash' to go down a level and, this time, 'echo $BASH_VERSION' gave the correct answer, 4.2.29(2)-release, and 'port SPACE TAB' gave a listing of all ports. I emptied Terminal's Preferences by unticking 'Run command', did everything else as in previous paragraph and got the same results as previous paragraph. I'm just hoping that this suggests to someone another thing to try. Barrie. ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Re: git bash_completion does not work - solved (?)
On Sat, Jul 21, 2012 at 12:51:04PM +0100, Barrie Stott wrote: On 21 Jul 2012, at 12:01, Clemens Lang wrote: I have now edited /etc/shells with MacVim to add /opt/local/bin/bash as the first in the list. I then ran 'chsh -s /opt/local/bin/bash'. I have done this on my system, too, and it works fine for me. I had already done what you suggested in Terminal's Preferences - Settings - Shell. I removed all terminals, opened a new one and typed 'echo $BASH_VERSION'. The result was the same as before: 3.2.48(1)-release. What have I missed? Try resetting your Terminal preferences to the default. It should use /usr/bin/login then, which should start the shell you chose via chsh. Nearer in that there's more info and it half works. I ticked 'Run command' in Terminal's Preferences and entered /usr/bin/login. Deleted all terminals (does this need doing?) and opened a new one. Same as before for 'echo $BASH_VERSION'. Typed 'bash' to go down a level and, this time, 'echo $BASH_VERSION' gave the correct answer, 4.2.29(2)-release, and 'port SPACE TAB' gave a listing of all ports. Unfortunately, I don't think this will persist on a Terminal.app restart. I emptied Terminal's Preferences by unticking 'Run command', did everything else as in previous paragraph and got the same results as previous paragraph. I'm just hoping that this suggests to someone another thing to try. Barrie. -- Damon McDougall http://damon-is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Re: git bash_completion does not work - solved (?)
On 21 Jul 2012, at 13:19, Damon McDougall wrote: On Sat, Jul 21, 2012 at 12:51:04PM +0100, Barrie Stott wrote: On 21 Jul 2012, at 12:01, Clemens Lang wrote: I have now edited /etc/shells with MacVim to add /opt/local/bin/bash as the first in the list. I then ran 'chsh -s /opt/local/bin/bash'. I have done this on my system, too, and it works fine for me. I had already done what you suggested in Terminal's Preferences - Settings - Shell. I removed all terminals, opened a new one and typed 'echo $BASH_VERSION'. The result was the same as before: 3.2.48(1)-release. What have I missed? Try resetting your Terminal preferences to the default. It should use /usr/bin/login then, which should start the shell you chose via chsh. Nearer in that there's more info and it half works. I ticked 'Run command' in Terminal's Preferences and entered /usr/bin/login. Deleted all terminals (does this need doing?) and opened a new one. Same as before for 'echo $BASH_VERSION'. Typed 'bash' to go down a level and, this time, 'echo $BASH_VERSION' gave the correct answer, 4.2.29(2)-release, and 'port SPACE TAB' gave a listing of all ports. Unfortunately, I don't think this will persist on a Terminal.app restart. No it doesn't. Barrie. ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Re: git bash_completion does not work - solved (?)
On 21 Jul 2012, at 11:07, Ryan Schmidt wrote: On Jul 21, 2012, at 04:53, Barrie Stott wrote: On 20 Jul 2012, at 16:08, Clemens Lang wrote: On Fri, Jul 20, 2012 at 09:56:24AM -0500, Ryan Schmidt wrote: I am still not sure what to change or how to verify it was successful. In Lion's Terminal.app, I have opened Preferences - Settings - Shell, checked the Run command box, and filled in /opt/local/bin/bash -l. The Run inside shell checkbox is not checked. The bash port is installed. If I open a new terminal window and type echo $SHELL it still prints /bin/bash. Is that a correct way to verify that these steps were not successful? What else should I be doing? Try echo $BASH_VERSION. It should print something along the line of 4.2.something. If it doesn't you're not using MacPorts bash. I upgraded my system this morning and I now have: bash @4.2.29_0+universal (active) bash-completion @2.0_1 (active) I ran the following: gbs:~ $ echo $BASH_VERSION 3.2.48(1)-release gbs:~ $ /bin/bash --version GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0) gbs:~ $ which bash /opt/local/bin/bash gbs:~ $ bash --version GNU bash, version 4.2.29(2)-release (i386-apple-darwin10.8.0) The results disagree with what Clemens said. But have you actually followed the instructions from earlier in this thread about how to change your shell from /bin/bash to /opt/local/bin/bash? You need to do that first. Thank you for this and your Terminal Preferences change. Everything would have been fine using them and what Stephan said: add /opt/local/bin/bash to /etc/shells and obey chsh -s /opt/local/bin/bash Unfortunately, I thought that merely removing Terminal windows, rather than typing cmd-q, was sufficient to start with a clean Terminal state. Once I used cmd-q everything was fine. I'm grateful for all the help given. Barrie ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Re: git bash_completion does not work - solved (?)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Barrie Stott wrote: On 21 Jul 2012, at 11:07, Ryan Schmidt wrote: On Jul 21, 2012, at 04:53, Barrie Stott wrote: On 20 Jul 2012, at 16:08, Clemens Lang wrote: [snip] Thank you for this and your Terminal Preferences change. Everything would have been fine using them and what Stephan said: add /opt/local/bin/bash to /etc/shells and obey chsh -s /opt/local/bin/bash Unfortunately, I thought that merely removing Terminal windows, rather than typing cmd-q, was sufficient to start with a clean Terminal state. Once I used cmd-q everything was fine. I'm grateful for all the help given. Thanks also from me. I've been silently following this thread trying to work out why alt-backspace doesn't work as expected thinking I was using /opt/local/bin/bash -v4 Now it does. Cheers, Phil... - -- But masters, remember that I am an ass. Though it be not written down, yet forget not that I am an ass. Wm. Shakespeare - Much Ado About Nothing -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: §auto-key-locate cert pka ldap hkp://keys.gnupg.net Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJQCr7XAAoJEKuJdOaOnmMJfIwH/RmtmCwvG423U15ROkfNVn4V n02EWBC3YJVVa3aY0xyRtscIUb490pW8hZrhz31y0rq5MQ+VlXImXF/9zx4LbbZS cBtvRjzLP+6LWqjA6UNCGcWiM7tsTFW9YWAhYnkG9NIBGi++d1D00pJSZiQFzVbn 99naynFjqHCiQebdjYgifDpgdqtZFgCZW7BNr6Ykkt8wY7aUI70FYRKDk76R5EcL Fc3uE9F9qDuU6f5GtVrssoxHdW+r0WtgoCgZ9KvytwthMs1b8G2zbQKv2mYKEWAB VTtGNGxMZkzo7NWCDzs6ewXAyI+fenA0kB3pX9wov/AI5p0fNETCUrIom2th3Co= =8tbD -END PGP SIGNATURE- ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
git bash_completion does not work - solved (?)
Hi, I have taken the freedom of summarizing the proper way of configuring Bash as per this discussion ## Proper setting of BASH: $ port install bash Testing current configuration: $ which bash /opt/local/bin/bash $ bash --version GNU bash, version 4.2.29(2)-release (i386-apple-darwin10.8.0) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. $ echo $SHELL /bin/bash $ echo $BASH /bin/bash $Test the settings for your account as present in the dscl database: dscl . -read /Users/yourusername | grep ‘UserShell:’ UserShell: /bin/bash Configuring BASH: 1. Use your favorite text processor sudo emacs /etc/shells add: /opt/local/bin/bash as first on the list save 2. Run: chsh -u your_username -s /opt/local/bin/bash Testing Proper Configuration: $ which bash /opt/local/bin/bash $ bash --version GNU bash, version 4.2.29(2)-release (i386-apple-darwin10.8.0) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. $ echo $BASH /opt/local/bin/bash $ echo $SHELL /opt/local/bin/bash $Test the settings for your account as present in the dscl database: dscl . -read /Users/yourusername | grep ‘UserShell:’ /opt/local/bin/bash ## I found that there is no need to: Go to TerminalPreferencesStartupCommand (complete path): Add to the top of the list: /opt/local/bin/bash -l These settings can be left default (I am running MacOSX10.6.8) Now my question to all of you is: Does one need to do this for the ‘root’ account as well? Thanks --R ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Re: git bash_completion does not work - solved (?)
On 2012-07-16 03:10, Ryan Schmidt wrote: On Jul 15, 2012, at 15:26, Clemens Lang wrote: On Sun, Jul 15, 2012 at 10:13:13PM +0200, Stefan Scheidt wrote: Question: Is this the right way to use MacPorts bash as login shell? Although `port notes bash-completion` suggests changing your terminal emulator's preferences, this is a perfectly fine way to do it, too (and it also is what I've been using for a couple of months now). I was unable to figure out exactly what I was meant to be changing in Terminal's preferences to make this work. Some more detailed instructions are in the howto section of the wiki: http://trac.macports.org/wiki/howto/bash-completion#Step3:UsebashfromMacPortsinyourterminal Rainer ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Re: git bash_completion does not work - solved (?)
Hello, On 2012-07-21 22:57, Rodolfo Aramayo wrote: I have taken the freedom of summarizing the proper way of configuring Bash as per this discussion You are right that there are two possibilities of adjusting your environment to use /opt/local/bin/bash in your terminal instead of the bash version shipped with Mac OS X: a) change the login shell b) change the preferences of your terminal emulator Note that changing the login shell is more invasive as it requires changing system files. Also, in case bash from MacPorts ever becomes unusable, it's easier to recover if you still have a working login shell (recovery is possible in either case). Thus, I recommend to switch to bash by editing the preferences of your terminal emulator, which can easily be reverted by choosing Login shell again. Detailed instructions on the configuration of Terminal.app/iTerm2.app are in the wiki in the howto section: http://trac.macports.org/wiki/howto/bash-completion#Step3:UsebashfromMacPortsinyourterminal Rainer ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Re: git bash_completion does not work - solved (?)
On Sat, Jul 21, 2012 at 5:29 PM, Rainer Müller rai...@macports.org wrote: Note that changing the login shell is more invasive as it requires changing system files. Also, in case bash from MacPorts ever becomes unusable, it's easier to recover if you still have a working login shell (recovery is possible in either case). Thus, I recommend to switch to bash by editing the preferences I suggested that earlier and got yelled at for being too negative -- brandon s allbery allber...@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Re: git bash_completion does not work - solved (?)
On Fri, Jul 20, 2012 at 09:56:24AM -0500, Ryan Schmidt wrote: I am still not sure what to change or how to verify it was successful. In Lion's Terminal.app, I have opened Preferences - Settings - Shell, checked the Run command box, and filled in /opt/local/bin/bash -l. The Run inside shell checkbox is not checked. The bash port is installed. If I open a new terminal window and type echo $SHELL it still prints /bin/bash. Is that a correct way to verify that these steps were not successful? What else should I be doing? Try echo $BASH_VERSION. It should print something along the line of 4.2.something. If it doesn't you're not using MacPorts bash. -- Clemens Lang ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Re: git bash_completion does not work - solved (?)
On Fri, Jul 20, 2012 at 10:56 AM, Ryan Schmidt ryandes...@macports.orgwrote: not checked. The bash port is installed. If I open a new terminal window and type echo $SHELL it still prints /bin/bash. Is that a correct way to verify that these steps were not successful? What else should I be doing? $SHELL is typically set by login, not by the shell itself. $BASH_VERSION should tell you what version you are running, and $0 may be useful as well. (You may want to set $SHELL in environment.plist.) -- brandon s allbery allber...@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Re: git bash_completion does not work - solved (?)
On Sun, Jul 15, 2012 at 9:10 PM, Ryan Schmidt ryandes...@macports.orgwrote: I was unable to figure out exactly what I was meant to be changing in Terminal's preferences to make this work. Presumably changing the command to run from your login shell to /opt/local/bin/bash -l. -- brandon s allbery allber...@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users