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

Aliases not working in Vscode terminal #17

Open
BolajiAyodeji opened this issue Jan 2, 2019 · 12 comments
Open

Aliases not working in Vscode terminal #17

BolajiAyodeji opened this issue Jan 2, 2019 · 12 comments

Comments

@BolajiAyodeji
Copy link

The aliases work just fine on my git bash but I just tried running them on my Vscode terminal and it didn't work at all
ERROR: bash: command not found

@SarathSantoshDamaraju
Copy link
Owner

Did you try re-starting VS code?

@BolajiAyodeji
Copy link
Author

Did you try re-starting VS code?

Yes, I did, still same.
Not working!

@SarathSantoshDamaraju
Copy link
Owner

SarathSantoshDamaraju commented Jan 4, 2019

It should reflect, I will look into it. But for that, I need some debug info from you, can you confirm/share the following

If not

  • Did you try typing the lazyGit commands from your terminal/command prompt other than git bash

  • Share your VS code and OS details?

@BolajiAyodeji
Copy link
Author

BolajiAyodeji commented Jan 4, 2019

It should reflect, I will look into it. But for that, I need some debug info from you, can you confirm/share the following

If not

  • Did you try typing the lazyGit commands from your terminal/command prompt other than git bash
  • Share your VS code and OS details?

Let me try this

@SarathSantoshDamaraju
Copy link
Owner

@BolajiAyodeji Is it fixed?

@BolajiAyodeji
Copy link
Author

@SarathSantoshDamaraju Nope.
That issue did not help.
YES, That's what I'm trying to do, I've been using LazyGit commands on git bash, it works fine but on terminal/command it doesn't
VScode v1.30.2
Windows 10

@SarathSantoshDamaraju
Copy link
Owner

SarathSantoshDamaraju commented Jan 11, 2019

I believe issue is with the bash file. This is written for Linux systems, thus bash file is given as .bash_profile. If i am not wrong in windows it is .bashrc and this might be reason behind not able to access the commands from the Windows CMD. I need your help in it.

TLDR; Try pasting this file in .bashrc

  1. Open the file .bashrc which is found in location C:\Users\USERNAME\.bashrc

  2. If file .bashrc not exist then create it using below steps:

  • Open Command Prompt and goto C:\Users\USERNAME\.
  • Type command notepad ~/.bashrc
  • It generates the .bashrc file.
  • Add this commands and restart terminal.

Please let me know if this works.

@JoshMurph316
Copy link

adding my aliases to the .bashrc worked for me. Thank you!

@chelojimenez
Copy link

.bashrc worked for me too!

@Isaac-Svi
Copy link

@SarathSantoshDamaraju Perfect! Fixed it for me as well. Thanks a lot. 👍

@xmazlan
Copy link

xmazlan commented Jun 2, 2021

I believe issue is with the bash file. This is written for Linux systems, thus bash file is given as .bash_profile. If i am not wrong in windows it is .bashrc and this might be reason behind not able to access the commands from the Windows CMD. I need your help in it.

TLDR; Try pasting this file in .bashrc

  1. Open the file .bashrc which is found in location C:\Users\USERNAME\.bashrc
  2. If file .bashrc not exist then create it using below steps:
  • Open Command Prompt and goto C:\Users\USERNAME\.
  • Type command notepad ~/.bashrc
  • It generates the .bashrc file.
  • Add this commands and restart terminal.

Please let me know if this works.

perfect

@levietanh0001
Copy link

levietanh0001 commented Oct 27, 2022

I believe issue is with the bash file. This is written for Linux systems, thus bash file is given as .bash_profile. If i am not wrong in windows it is .bashrc and this might be reason behind not able to access the commands from the Windows CMD. I need your help in it.

TLDR; Try pasting this file in .bashrc

  1. Open the file .bashrc which is found in location C:\Users\USERNAME\.bashrc
  2. If file .bashrc not exist then create it using below steps:
  • Open Command Prompt and goto C:\Users\USERNAME\.
  • Type command notepad ~/.bashrc
  • It generates the .bashrc file.
  • Add this commands and restart terminal.

Please let me know if this works.

In my case I had to drop '&&' and input aliases like this for the commands to work:

alias g!='git init'
alias gs='git status'

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

7 participants