terminal

Changing the color of a specific piece of text in emacs without creating a theme

点点圈 提交于 2020-01-12 08:00:42
问题 Is it possible to select a piece of text you're editing and change its color? I know it's possible to create a color theme that will color certain kinds of text (like for example coloring functions in a certain programming language), but is it possible to do a one time color change to a selected piece of text in a specific emacs document without creating a theme? thanks in advance. 回答1: A theme doesn't allow you to specify the color of arbitrary text in any case. It only describes a set of

Changing the color of a specific piece of text in emacs without creating a theme

主宰稳场 提交于 2020-01-12 08:00:21
问题 Is it possible to select a piece of text you're editing and change its color? I know it's possible to create a color theme that will color certain kinds of text (like for example coloring functions in a certain programming language), but is it possible to do a one time color change to a selected piece of text in a specific emacs document without creating a theme? thanks in advance. 回答1: A theme doesn't allow you to specify the color of arbitrary text in any case. It only describes a set of

Can't install Debugger gem - Rails - Mac OSX Mavericks

好久不见. 提交于 2020-01-12 07:51:05
问题 I'm trying to run an app locally but when I do I get thrown this error. Patricks-MacBook-Air:niet pbj$ rails s Could not find debugger-1.6.1 in any of the sources Run `bundle install` to install missing gems. When I run 'bundle install' I get this: Fetching source index from https://rubygems.org/ Enter your password to install the bundled RubyGems to your system: Using rake (10.1.0) Using i18n (0.6.5) Using minitest (4.7.5) Using multi_json (1.8.0) Using atomic (1.1.13) Using thread_safe (0.1

How to switch Python versions in Terminal?

谁都会走 提交于 2020-01-12 01:57:49
问题 My Mac came with Python 2.7 installed by default, but I'd like to use Python 3.6.1 instead. How can I change the Python version used in Terminal (on Mac OS)? Please explain clearly and offer no third party version manager suggestions . 回答1: The simplest way would be to add an alias to python3 to always point to the native python installed. Add this line to the .bash_profile file in your $HOME directory at the last, alias python="python3" Doing so makes the changes to be reflected on every

Opening a new terminal tab in OSX(Snow Leopard) with the opening terminal windows directory path

做~自己de王妃 提交于 2020-01-11 17:41:14
问题 I've been Googling for a while looking for a simple way to do this, and I can't find one. I have a custom terminal environment set up (zsh) with various aliases and functions to make things easier. One thing I keep running into is that I will quickly APPLE-t to create a new tab and then type a command relative to the path of the terminal window I was just in. This invariably fails because the path of the new tab is ~/ instead of whatever I was just using! Any ideas for a script to set the

Bash error when opening terminal [closed]

三世轮回 提交于 2020-01-11 14:40:52
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I recently installed Ruby on my mac using this following command: brew install rbenv ruby-build I was then instructed to enter this command to add rbenv to bash so it loads every time the terminal is open: # Add rbenv to bash so that it loads every time you open a terminal echo 'if which rbenv > /dev/null; then

Spinner Animation and echo command

╄→гoц情女王★ 提交于 2020-01-11 12:17:33
问题 This is a part of my bash file. The output I need is: [ - ] Copyright of KatworX© Tech. Developed by Arjun Singh Kathait and Debugged by the ☆Stack Overflow Community☆ I want the spinner animation to continue spinning for 5 seconds while the echo command is being displayed. Can the community help??? spinner() { local pid=$! local delay=0.75 local spinstr='|/-\' while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do local temp=${spinstr#?} printf " [%c] " "$spinstr" local spinstr=$temp$

Run C program in Xcode 4 using makefile

青春壹個敷衍的年華 提交于 2020-01-11 08:45:31
问题 I have created an 'External Build Project' in Xcode 4 using a makefile. The project builds perfectly, except the only way I know how to get it to run is in Terminal. Is there a way I can run the program in Xcode 4 or is Terminal it ? 回答1: Yes, you need to create a Custom Executable, so that Xcode knows where your built executable resides and how to run it. In Xcode 3 it's Project -> New Custom Executable... . This will allow you to to run your executable and even do source level debugging if

Dynamic variable names for an array in bash

∥☆過路亽.° 提交于 2020-01-11 07:18:47
问题 I have an array called "loop". For each element in "loop" I want to create an array whose name contains the text of the current element. I then want to loop through each new array and print every element from each array. This post seems to have a good solution for variables but I do not know how to adapt it to work for arrays. My Script #!/bin/bash loop=( first second third ) for word in "${loop[@]}" do declare "${word}_holder=( hello world )" var="${word}_holder" echo "$var" for i in "${!var

Dynamic variable names for an array in bash

有些话、适合烂在心里 提交于 2020-01-11 07:17:10
问题 I have an array called "loop". For each element in "loop" I want to create an array whose name contains the text of the current element. I then want to loop through each new array and print every element from each array. This post seems to have a good solution for variables but I do not know how to adapt it to work for arrays. My Script #!/bin/bash loop=( first second third ) for word in "${loop[@]}" do declare "${word}_holder=( hello world )" var="${word}_holder" echo "$var" for i in "${!var