terminal

How do I build an executable for an application written in Swift from the terminal?

橙三吉。 提交于 2020-01-03 02:53:15
问题 I'm asking how to do this outside of Xcode. A Swift script written in a text editor can be executed with xcrun swift hello_world.swift or swift hello_world.swift . They can also be set to executable and run with a shebang. This is parallel to a scripting language like Python. But since Swift is a compiled language, I'm sure there has to be some way of building a Swift executable through the Terminal using swift , clang , etc. Has anyone found anything regarding this? I've surprisingly found

Could Git correctly display ISO Latin 1 accents in a UTF-8 terminal?

只愿长相守 提交于 2020-01-03 01:58:09
问题 Fork from Don't display ^M (carriage return) in git grep output In my MinTTY (Cygwin on Windows), git grep display weird chars instead of accents: Upon verification, it seems that the filetype is: ISO-8859 text, with very long lines, with CRLF line terminators While my MinTTY is set up as UTF-8: # Text Font=Powerline Consolas FontHeight=9 BoldAsFont=yes BoldAsColour=yes AllowBlinking=yes Locale=C Charset=UTF-8 # Terminal Term=xterm-256color Of course, when grepping in files from different

RVM won't work over SSH (as a function)

戏子无情 提交于 2020-01-02 16:28:19
问题 I just installed RVM on a Debian 6 server, without having any problem in the beginning. However after everything is set up, I can't run RVM in the terminal. The message I get when I type rvm use is: RVM is not a function, selecting rubies with 'rvm use ...' will not work. You need to change your terminal emulator preferences to allow login shell. Sometimes it is required to use `/bin/bash --login` as the command. Please visit https://rvm.io/integration/gnome-terminal/ for a example. I am

RVM won't work over SSH (as a function)

时光总嘲笑我的痴心妄想 提交于 2020-01-02 16:27:29
问题 I just installed RVM on a Debian 6 server, without having any problem in the beginning. However after everything is set up, I can't run RVM in the terminal. The message I get when I type rvm use is: RVM is not a function, selecting rubies with 'rvm use ...' will not work. You need to change your terminal emulator preferences to allow login shell. Sometimes it is required to use `/bin/bash --login` as the command. Please visit https://rvm.io/integration/gnome-terminal/ for a example. I am

Can't open local terminal

谁说胖子不能爱 提交于 2020-01-02 11:59:10
问题 I try to initialize my terminal in Android Studio but it gives me error. It says Can't open local terminal. java.io.IOException: Couldn't create PTY My computer runs on windows 10. How to fix this? 回答1: you could run studio.exe as administrator, if the solution not work, try another solution: add a Shell path(git-bash or others) to Android Studio Settings(setting--->Tools--->Terminal--->Shell path) 回答2: This problem was occured when, you clone one android project from Github Repository.. To

How can I change the default directory of the terminal?

若如初见. 提交于 2020-01-02 10:44:33
问题 I want to change the default directory of the Android Studio (v2.2.2) terminal. When i open the terminal it is based on the direcetory of the project. C:\path-of-the-project\ I often have to use adb shell , so i must navigate to the SDK path (platform-tools) to use adb command. Is it possible to change the default directory of the terminal making it point to the SDK-->tools folder? 回答1: You can change the default directory of the Android Studio terminal. Go to File->Settings->Tools->Terminal

MacOS - automake: command not found

谁说胖子不能爱 提交于 2020-01-02 10:06:05
问题 I am trying to install automake on MacOS using brew . From terminal I write, brew install automake says Warning: automake-1.15 already installed . When I then try automake version it responds -bash: automake: command not found . I am using OS X El Capitan. $ automake version -bash: automake: command not found $ brew install automake Warning: automake-1.15 already installed $ automake version -bash: automake: command not found 回答1: The solution had to do with brew having failed to link the

Java Terminal Only Printing Output From First Command

拟墨画扇 提交于 2020-01-02 09:39:16
问题 EDIT: The code now works! Here's how I did it: package me.nrubin29.jterminal; import javax.swing.*; import javax.swing.filechooser.FileSystemView; import javax.swing.text.SimpleAttributeSet; import javax.swing.text.StyleConstants; import java.awt.*; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.io.*; import java.util.ArrayList; public class JTerminal extends JFrame { private JTextPane area = new JTextPane(); private JTextField input = new JTextField("Input");

Transfer files from computer (Mac) to iOS device (jailbroken if necessary) via USB using terminal

痴心易碎 提交于 2020-01-02 09:29:15
问题 I am looking for a way to transfer files from my Mac to the iPhone via USB, and it needs to be done either using the terminal or programmatically. So far, I have seen some other questions on that topic on StackOverflow, and the most common reply was to use GUI-tools such as iExplorer. Unfortunately, I cannot use GUI-based tools. One interesting answer was this one (https://stackoverflow.com/a/15795578/299711), which mentioned the MobileDevice library, but alas, it seems very poorly documented

Git - how to remove branch from checkout autocomplete

感情迁移 提交于 2020-01-02 07:53:13
问题 I've deleted some local branches via git branch -d branchname , but they are still exist in autocomplete (when I put git checkout , then press tab key, I see all deleted branches in list). I've tried to make git gc and git prune , but nothing changes. 回答1: If you are sure that you do not want the branch, you can remove it from your local and the remote like this: $ git branch -D branchname $ git push origin :branchname Then it will stop appearing in autocomplete results. 回答2: TL;DR - the real