| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=4.7 required=5.0 tests=AWL,BAYES_50,BOTNET,RCVD_IN_DNSWL_NONE,TW_RW,TW_WX |
| X-Spam-Check-By: | sourceware.org |
| Message-id: | <4D9B913F.3070303@cygwin.com> |
| Date: | Tue, 05 Apr 2011 18:01:35 -0400 |
| From: | "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com> |
| Reply-to: | cygwin AT cygwin DOT com |
| User-Agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090320 Remi/2.0.0.21-1.fc8.remi Lightning/0.9 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0 |
| MIME-version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: .profile not sourced? |
| References: | <infv5a$mi2$1 AT dough DOT gmane DOT org> |
| In-reply-to: | <infv5a$mi2$1@dough.gmane.org> |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
On 4/5/2011 4:47 PM, philippe roux wrote:
> Hello,
>
> I have a file ~/.profile which contains some alias like
>
> alias la='ls -la'
>
> and ./bash_profile file containing the lines
>
> # source the users profile if it exists
> if [ -f "${HOME}/.profile" ] ; then
> source "${HOME}/.profile"
> fi
>
> when i launch the default shell (mintty) from the cygwin.bat short cuts I get
mintty is a terminal emulator, not a shell. bash is a shell.
> 8<--8<--8<--8<--8<-- first window 8<--8<--8<--8<--8<--8<--
> $ la
> total 33
> drwxr-xr-x+ 1 philippe None 0 Apr 5 21:37 .
> drwxrwxrwt+ 1 philippe root 0 Apr 5 17:52 ..
> -rw------- 1 philippe None 2869 Apr 5 22:33 .bash_history
> -rwxr-xr-x 1 philippe None 1206 Apr 5 22:19 .bash_profile
> -rwxr-xr-x 1 philippe None 5663 Apr 3 21:33 .bashrc
> -rwxr-xr-x 1 philippe None 1461 Apr 3 21:34 .inputrc
> -rwxr-xr-x 1 philippe None 1695 Apr 5 22:18 .profile
>
> $ mintty &
> 8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--
>
> but in the new mintty window alias are not sourced :
>
> 8<--8<--8<--8<-- second window 8<--8<--8<--8<--8<--8<--8<--
> $ la
> bash: la: command not found
>
> 8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--
>
> what should i modify to recover my alias?
Do what cygwin.bat does - invoke bash as a login shell:
run mintty -e /bin/bash --login -i
--
Larry
_____________________________________________________________________
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |