Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BashRC #34

Closed
soheil-zz opened this issue May 8, 2015 · 11 comments
Closed

BashRC #34

soheil-zz opened this issue May 8, 2015 · 11 comments

Comments

@soheil-zz
Copy link

It'd be nice to load up your .bachrc and .bash_profile in command mode so you can use your aliases etc.

@pcottle
Copy link
Contributor

pcottle commented May 8, 2015

We do load up the bashrc and check for aliases:

https://github.com/facebook/PathPicker/blob/master/src/output.py#L109

Is something else not working? What format are you aliases in?

(closing for now, open up again if you have a solid repro)

@pcottle pcottle closed this as completed May 8, 2015
@soheil-zz
Copy link
Author

I have a ll alias to do ls -l it didn't work...

On Thu, May 7, 2015 at 6:17 PM, Peter Cottle notifications@github.com
wrote:

We do load up the bashrc and check for aliases:

https://github.com/facebook/PathPicker/blob/master/src/output.py#L109

Is something else not working? What format are you aliases in?

(closing for now, open up again if you have a solid repro)


Reply to this email directly or view it on GitHub
#34 (comment).

@cosinequanon
Copy link

I can repro this. I have source $HOME/.bash_aliases in my .bashrc and in .bash_aliases I have alias g="git "

Go to a git repository, and enter:
touch foo.txt
ls -l ./foo.txt | fpp
then press c and enter g add

I get the error: /home/sgoder/.fbPager.sh: line 4: g: command not found

@pcottle
Copy link
Contributor

pcottle commented May 8, 2015

I have source $HOME/.bash_aliases in my .bashrc and in .bash_aliases I have alias g="git "

yeah unfortunately we don't do recursive follows / sources :*( do either of you know if we could get bash to either:

  • give us the expanded format of a given alias
    or even
  • give us the entire concat of the bashrc file
    ?

let me try this inside the command script instead...

@shaneharter
Copy link

@pcottle Can't you just use alias ?

@pcottle
Copy link
Contributor

pcottle commented May 11, 2015

@shaneharter alias does not work inside shell scripts:

[pcottle:~/Desktop:]$ alias | wc -l
      54
[pcottle:~/Desktop:]$ echo "alias; echo 'alias is'; alias | wc -l" > ./test.sh 
[pcottle:~/Desktop:]$ sh ./test.sh
alias is
       0

unless you run with some weird mode, but that doesnt work for zsh

@shaneharter
Copy link

@pcottle Yeah i saw that after, sorry for the distraction :) Been using fpp for a few days now, 👍

@Addisonbean
Copy link

Is there a way to prevent it from sourcing my .zshrc? My .zshrc prints something every time it is executed and that can get annoying if I'm not starting up a new shell.

@pcottle
Copy link
Contributor

pcottle commented Jun 1, 2016

I somewhat have this issue as well, but I have a global flag to toggle it off. Basically I automatically ssh to my devserver at facebook unless I set a "local mode" flag

What does yours do? We could add (yet another) environment variable for this but I'm curious what the use case is.

@Addisonbean
Copy link

Oh yeah that's smart, thanks. Haha I just have this line in my .zshrc: fortune | cowsay | lolcat So I get a random fortune every time I start a new shell.

@pcottle
Copy link
Contributor

pcottle commented Jun 1, 2016

Haha, maybe I should do something similar. Terminal startups should be more fun!

From: Addison Bean <notifications@github.commailto:notifications@github.com>
Reply-To: facebook/PathPicker <reply@reply.github.commailto:reply@reply.github.com>
Date: Wednesday, June 1, 2016 at 3:59 PM
To: facebook/PathPicker <PathPicker@noreply.github.commailto:PathPicker@noreply.github.com>
Cc: Peter Cottle <pcottle@fb.commailto:pcottle@fb.com>, Mention <mention@noreply.github.commailto:mention@noreply.github.com>
Subject: Re: [facebook/PathPicker] BashRC (#34)

Oh yeah that's smart, thanks. Haha I just have this line in my .zshrc: fortune | cowsay | lolcat So I get a random fortune every time I start a new shell.

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/34#issuecomment-223150007, or mute the threadhttps://github.com/notifications/unsubscribe/ABFRn2hnIoZp3_zf_fiK0W585Q4VqYUDks5qHg7pgaJpZM4ETK3G.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants