terminal

CLion run program in separate system terminal

匆匆过客 提交于 2019-12-10 01:36:39
问题 I have an ncurses program that I'd like to interactively debug using CLion. The problem is that when I run the program in CLion to debug it, the inbuilt console where the program is run doesn't display the output of the ncurses program properly. I'd like to have the program run in my systems terminal so I can see the output properly whilst debugging the program with CLions debugger. Is there any way to do this? 回答1: The best way to accomplish this is to use GDB now it can be really

Compiling/Running Java files in Terminal

半城伤御伤魂 提交于 2019-12-09 23:59:30
问题 I'm attempting to run a file that calls multiple files, but I'm getting some errors. Inside the current directory called day4Measurement , I have 13 files: BuggyMeasurement.java, BuggyMeasurement01.java, BuggyMeasurement02.java, BuggyMeasurement03.java, BuggyMeasurement04.java...BuggyMeasurement10.java, MeasurementTest.java, and Measurement.java. Measurement.java contains the main() and calls all the other files. Here's the main() : public static void main(String [] args){ JUnitCore tester =

oh my Zsh使用手册

假如想象 提交于 2019-12-09 23:58:59
简单使用oh my zsh 安装oh my Zsh 安装zsh 安装curl或者wget 下载并安装oh my zsh: curl 下载方式 curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh wget下载 wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | shoh 使用oh my zsh插件 编辑 ~/.zshr.c 文件,添加一行使插件在加载oh my zsh时初始化,格式 plugins=(git bundler osx rake ruby) 查看plugins的README文件,看看怎么使用插件 有名的插件有: git:当前目录如果是受git控制的目录下,会显示[git],对很多git 命令进行了简化,例如 gco=git checkout , gd=git diff , gst=git status , g=git textmate: mr 创建ruby的框架项目, tx filename 使用 textmate 打开文件 osx:tab的增强,使用 quick-look filename 直接预览文件 autojump:强大的文件夹跳转工具。

How to correctly link patched GNU readline library to all existing programs?

本小妞迷上赌 提交于 2019-12-09 23:55:45
问题 My original issue was that I wanted a way to distinguish between whether I am in vi-command mode or vi-insert mode while using bash in vi-mode. I understand that as of GNU readline 7.0 there is a way to set an indicator in the command prompt; however, what I want is rather to change the shape of the cursor (i.e. a vertical line while in insert mode and a solid block while in command mode). NOTE: I already tried placing the following in my .inputrc, which did the trick, but it caused some

rails server error ? (rails 3)

情到浓时终转凉″ 提交于 2019-12-09 23:45:38
问题 /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError) Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle from /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2.rb:8 from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler

How to move GCC in osx from xcode to /usr/bin

痴心易碎 提交于 2019-12-09 21:05:11
问题 I have the gcc compiler in "/Developer/usr/bin/gcc" but when i type in gcc into terminal it says can not be found, i assume this is because its not in the "/usr/bin" dir. So can i a) move gcc from the first dir to the second, or set some kind of shortcut pointing gcc to "/Developer/usr/bin/gcc" 回答1: Two choices: Edit your ~/.bashrc or ~/.bash_profile (or equivalent system files) and add /Developer/usr/bin/gcc to $PATH : export PATH="$PATH:/Developer/usr/bin/" Create a link (symlink in this

In bash, How can I force a flush of an incomplete line printed to the terminal

夙愿已清 提交于 2019-12-09 19:29:55
问题 I'm writing a script which does something like the following: echo -n "Doing stuff, wait for it... " do_stuff (($?==0)) && echo SUCCESS || echo FAILURE Excuse the poor bash skills. Anyway, the problem is that the first part of the line doesn't get printed until do_stuff is done - while it is important to me the user know what I'm running next. It is also important to me, since I'm pedantic, not to print a newline. So, the text is in the buffer and doesn't get flushed. This question is very

Dragging and Dropping a File onto a .sh file

 ̄綄美尐妖づ 提交于 2019-12-09 17:10:26
问题 I have a fairly good amount of knowledge with Batch. I'm trying to port a batch script over to Mac/UNIX, but my batch file has a drag-and-drop thing to it. Through countless Google searches, I have came up with nothing. They all say that you can drag-and-drop into a Terminal Window - not good for no-input-required scripts. Here is the code for Batch I have: cd %USERPROFILE% 7za x %* -o%USERPROFILE%\Desktop\Temp 7za a %1 %USERPROFILE%\Desktop\Temp\* cd %USERPROFILE%\Desktop rmdir /q /s Temp\

Where can I find a graphical command shell?

自闭症网瘾萝莉.ら 提交于 2019-12-09 16:31:22
问题 Terminals and shells are very powerful but can be complicated to learn, especially to get the best out of them. Does anyone know of a more GUI based command shell that helps a user or displays answers in a more friendly way? I'm aware of IPython, but even the syntax of that is somewhat convoluted, although it's a step in the right direction. Further to this, results could be presented graphically, e.g. wouldn't it be nice to be able to pipe file sizes into a pie chart? 回答1: Hotwire is an

Line-wrapping problems with IPython shell

 ̄綄美尐妖づ 提交于 2019-12-09 14:32:44
问题 If I have run a long line in IPython, and try and recall it (using the up-arrow) or backspace beyond the start of the current line, it displays incorrectly (all smushed into one line) For example, in the following session I wrote a long line [1] , entered a somewhat-blank line [2] , then up-arrowed twice to get the print statement on line [3] , and the following happened: Happens in both iTerm and Terminal.app.. I had a similar problem with regular terminal sessions, which was fixed by