How do I install a shell script? - macos

I want to use the shell script git-ftp on OSX but I have absolutely no experience using shell scripts. (I use git from the command line a bit and that's all)
What do I do with the files downloaded from that site?

No need to install
Open terminal application.
Drag git-ftp on terminal.
Run

Related

How to PATH pip from Spyder(anaconda3) to use in windows 10 command prompt

I use Spyder(anaconda3) to do much of my python work and I can use pip install directly from the spider console but not from windows 10 command prompt. Is there a way to PATH pip install from the spider/anaconda program to work directly with the command prompt?
Is this something that is strictly necessary or even useful to do, can the spider console handle all that is required (even non python instilations) without bothering with the windows comand prompt? For example if I were to run
pip install jupyterlab
from the spider console would this be an issue or would it make more sense to run it from the command prompt? (I know jupyterlab is included in annaconda I was just looking for an exapmle)
The only difference between running the Windows command shell from Spyder is that Spyder will automatically activate your conda environment. You can achive the same thing by running
conda activate
as the first command in your Windows cmd shell.
Alternatively you can start the cmd shell via the "Anaconda prompt" in the Windows Start Menu.

RVM's auto-detect Ruby version via repo files feature is not working in VSCode login shell terminal

RVM has a feature to detect and use the correct Ruby version based on e.g. a .ruby-version file in the repo. This requires a login shell which I have enabled in VSCode via:
"terminal.integrated.shell.linux": "bash",
"terminal.integrated.shellArgs.linux": ["--login"],
However the feature isn't working by default, I have to cd . every time I open the terminal as if it is not a login shell.
There's a similar issue about new tabs in a gnome shell: https://github.com/rvm/rvm/issues/2519
I wonder if anyone else ran into this and whether this might be an issue with VSCode or RVM?
The reason this doesn't work by default is because rvm hooks the cd command in the shell to setup the ruby/gem paths for your project and there's no cd issued to the shell by the VS Code terminal opening.
I was able to resolve this issue on my Linux system by adding the login setup as suggested in the question and then adding a simple cd . at the end of my ~/.bash_profile after the section where RVM is actually set up.
Doing this results in rvm properly adjusting the paths in the VS Code terminal.
This may be a workaround..
Add this in vs
"terminal.integrated.shellArgs.linux": [
"cd ."
],

macOS -- How to install plugin in .vimrc

If I want to add and install a plugin in my Vim on macOS, what should I write in .vimrc?
And after write the code in .vimrc, what command should I write?
I recommend spf13. It integrated almost every plugins you needed.
run following command to install
or you can read their github:
https://github.com/spf13/spf13-vim

Bower Init Register requires an interactive shell error

this is what I get when I use bower init
what could be the problem??
The problem is with the terminal/console you're using to.
I ran into this same problem other day, I was using Git bash as my terminal, and trying to run this command with Node.js command prompt worked normally.
Try to use another terminal, like cmder (I really recommend this to Windows users), Node.js command prompt or even Windows cmd itself. Hope to have helped you. Best wishes!
The solution is to install GIT bash and avoid
using MinTTY and follow the documentation. Here is the solution:
Uninstall existing GIT bash Reinstall GIT bash Set up during
installation:
Select Use Git from the Windows Command Prompt
Select Checkout Windows-style, commit Unix-style line endings
Select Use Windows' default console window
Okay this works for sure -
Go to https://cygwin.com/install.html and download either the
32 or 64 bit version of Cygwin.
Run the install and install it onto one of your drives.
Run the Cygwin.bat and you will get the same command line
interface.
When you run bower init, it will work just fine. The Mintty that
comes with GIT is broken for somethings. Use the shell that comes
with Cygwin and you will be fine.
It works for me no problem. I used the 64 bit version on a Window 8 64bit OS. Good Luck!
You're most likely running C:\Program Files\Git\git-bash.exe and can instead run C:\Program Files\Git\bin\bash.exe to eliminate the issue. This avoids having to install another yet another terminal.

how can I run shell script line by line [duplicate]

I'll love something like Microsoft Visual Studio's line-by-line debugging in bash, with current variables values and so.
Is there any tool or way to do it? set -x and set -v are nice but not perfect.
See bashdb.
If it's installed on your system, see man bashdb.
If it's not installed, see http://bashdb.sourceforge.net
Yes. Use "bashdb" from http://bashdb.sourceforge.net/
Latest version at time of writing
http://sourceforge.net/projects/bashdb/files/bashdb/4.2-0.8/
If you are on a Mac (like I was) then you might need to install the GNU version of Bash.
I did that using "MacPorts"
http://www.macports.org/
Once you have MacPorts...
port install bash
Then follow the instructions to
./configure (in bashdb unpacked directory)
make
sudo make install
Then add the folder where bashdb can be found in your PATH

Resources