Coder Social home page Coder Social logo

BashRC about pathpicker HOT 11 CLOSED

facebook avatar facebook commented on April 20, 2024
BashRC

from pathpicker.

Comments (11)

pcottle avatar pcottle commented on April 20, 2024

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)

from pathpicker.

soheil-zz avatar soheil-zz commented on April 20, 2024

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

On Thu, May 7, 2015 at 6:17 PM, Peter Cottle [email protected]
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).

from pathpicker.

cosinequanon avatar cosinequanon commented on April 20, 2024

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

from pathpicker.

pcottle avatar pcottle commented on April 20, 2024

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...

from pathpicker.

shaneharter avatar shaneharter commented on April 20, 2024

@pcottle Can't you just use alias ?

from pathpicker.

pcottle avatar pcottle commented on April 20, 2024

@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

from pathpicker.

shaneharter avatar shaneharter commented on April 20, 2024

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

from pathpicker.

Addisonbean avatar Addisonbean commented on April 20, 2024

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.

from pathpicker.

pcottle avatar pcottle commented on April 20, 2024

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.

from pathpicker.

Addisonbean avatar Addisonbean commented on April 20, 2024

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.

from pathpicker.

pcottle avatar pcottle commented on April 20, 2024

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

From: Addison Bean <[email protected]mailto:[email protected]>
Reply-To: facebook/PathPicker <[email protected]mailto:[email protected]>
Date: Wednesday, June 1, 2016 at 3:59 PM
To: facebook/PathPicker <[email protected]mailto:[email protected]>
Cc: Peter Cottle <[email protected]mailto:[email protected]>, Mention <[email protected]mailto:[email protected]>
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.

from pathpicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.