delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/22/22:21:08

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Message-ID: <42E1A956.8040106@alltel.net>
Date: Fri, 22 Jul 2005 21:20:06 -0500
From: Ken Dibble <kdibble AT alltel DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
MIME-Version: 1.0
To: cygwin <cygwin AT cygwin DOT com>
Subject: Re: How does one set aliases for Cygwin for XP Prof Windows? - Still doesn't work!
References: <9ED00E54321A9349A3A7B9C805C0984B04F4A177 AT maui DOT shoretel DOT com>
In-Reply-To: <9ED00E54321A9349A3A7B9C805C0984B04F4A177@maui.shoretel.com>
X-IsSubscribed: yes

top -posted : reformatted


>
>-----Original Message-----
>From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On Behalf
>Of Ken Dibble
>Sent: Friday, July 22, 2005 3:02 PM
>To: cygwin
>Subject: Re: How does one set aliases for Cygwin for XP Prof Windows?
>
>
>
>Patrick Sullivan wrote:
>
>  
>
>>Hi,
>>
>>
>>
>>I looked around and couldn't find out (from user guide or FAQs) how to
>>set my own alias settings for Cygwin.
>>
>>I have Cywin installed on my PC (running Windows XP Professional).
>>There has to be a file somewhere, where I can add the alias settings,
>>but I am not sure where it is.  Does anyone know where the file is for
>>putting personal alias settings?
>>
>>
>>
>>    
>>
>If you are talking about aliases within the bash shell, setting them in 
>~/.bashrc is a place used by many.
>
>Regards,
>Ken
>
>Patrick Sullivan wrote:
>
>
>  Ken,
>
>It still doesn't work after putting the aliases in ~/.bashrc  )-:
>I also tried putting them in ~/profile.ksh but it didn't work either.
>I did this one time, and there was a file in a certain location where I
>added them to, but I don't remember where it was...
>
>I tried putting them in as follows:
>
>alias ll='ls -l'
>alias h='history'
>alias main='cd /cygdrive/c/depot/source/main'
>alias ob2='cd /cygdrive/c/depot/Projects/ob2'
>alias depot='cd /cygdrive/c/depot'
>
>
>Thanks,
>
>Pat//
>  
>

You .bash_profile should look like:
---
# ~/.bash_profile: executed by bash for login shells.

if [ -e /etc/bash.bashrc ] ; then
  source /etc/bash.bashrc
fi

if [ -e ~/.bashrc ] ; then
  source ~/.bashrc
fi
----
If  memory serves, this is the default .bash_profile.

This would make sure that .bashrc gets executed whether your shell is a 
login or not.

If this is indeed your .bash_profile, I would next check permissions on 
both files to make sure they
are executable.

I am assuming that your login shell is bash.

If it still doesn't work, what happens when you source these files from 
a command prompt?




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019