terminal

Getting a Scala interpreter to work

久未见 提交于 2019-12-18 10:46:10
问题 I'm very new to Scala. I have downloaded it, got it working in Eclipse where I'll be developing it; but I can't make it work in Terminal. All sites and books say to just type scala - this doesn't work. The website infuriatingly says: We assume that both the Scala software and the user environment are set up correctly. How do I do that bit? I'm very new to this, and using Jargon or assuming too much knowledge of frameworks around Scala will ruin a good response; please keep it simple. Mac OS X

IPython console can't locate “backports.shutil_get_terminal_size” and won't load

杀马特。学长 韩版系。学妹 提交于 2019-12-18 10:36:01
问题 I'm running Python2.7 on windows 10 doing env and most pkg management with Anaconda. After upgrading a number of packages, my ipython console now fails to start in any IDE or at the console. When I attempt to run it at the console I get this error: Traceback (most recent call last): File "C:\Anaconda3\Scripts\ipython-script.py", line 3, in <module> import IPython File "C:\Anaconda3\lib\site-packages\IPython\__init__.py", line 48, in <module> from .core.application import Application File "C:

envsubst: command not found on Mac OS X 10.8

泪湿孤枕 提交于 2019-12-18 10:22:49
问题 When I try to run a script that contains the envsubst command, I get this error. Looking online, this seems to be a standard bash command, so I am not sure what to install in order to get it to work. 回答1: Edit: @cobberboy 's anwer is more correct. upvote him. brew install gettext brew link --force gettext Following is my old answer: envsubst is included in gettext package. Therefore you may compile it by your own, using standard build tools such as make or using homebrew . However, it seems

Docker-Compose can't connect to Docker Daemon

廉价感情. 提交于 2019-12-18 10:18:07
问题 I am getting an error message saying I can't connect to the docker daemon. I have looked into other people's answers who have had similar issues but it hasn't helped. I am running the version of Ubuntu 15.10. I will try to provide all the info I have. root@# docker-compose -f docker-compose-deps.yml up -d ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running? If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

screen: how to turn on alternate screen?

三世轮回 提交于 2019-12-18 10:16:31
问题 When I work in terminal, I see the history of the last shell commands execution output. If I run vim, I see the file I open full screen. When I exit vim, I can see the history of the last shell commands again. However, when I use vim from screen. I see the footprint of the file I was just editing on my exit from vim instead of the history of the last shell commands. I'd like to see the shell's history though. How can I achieve this behaviour? I used: terminal.app and iterm2.app tried

How to find all file extensions recursively from a directory?

笑着哭i 提交于 2019-12-18 10:16:07
问题 What command, or collection of commands, can I use to return all file extensions in a directory (including sub-directories)? Right now, I'm using different combinations of ls and grep , but I can't find any scalable solution. 回答1: How about this: find . -type f -name '*.*' | sed 's|.*\.||' | sort -u 回答2: find . -type f | sed 's|.*\.||' | sort -u Also works on mac. 回答3: list all extensions and their counts of current and all sub-directories ls -1R | sed 's/[^\.]*//' | sed 's/.*\.//' | sort |

How do I clear the terminal screen in Haskell?

空扰寡人 提交于 2019-12-18 10:15:01
问题 How can I clear a terminal screen after my user has selected an option from my application's menu? 回答1: :! run the shell command :! cls under windows :! clear under linux and OS X 回答2: This is what you may be looking for: ansi-terminal: Simple ANSI terminal support, with Windows compatibility You can find it in Hackage and install using cabal install ansi-terminal . It specifically has functions for clearing the screen, displaying colors, moving the cursor, etc. Using it to clear the screen

Unable to use Screen efficiently in Mac's Terminal

▼魔方 西西 提交于 2019-12-18 10:14:15
问题 The post summarizes problems in using Screen in Mac's terminal when you have the following in your .zshrc if [[ $STY = '' ]] then screen -xR; fi Solution #1 is not working but Solution #2 works: Clipboard programs: pbcopy, pbpaste and xsel do not work at all Bug in Vim when used in Mac: Unable to have no scattered windows in Screen by .Xresources. Solved: Ctrl A stops working in terminal. This suggests me that Screen's keyboard bindings need to be changed slightly. Solved: The scrolling with

How to set font color for STDOUT and STDERR

只愿长相守 提交于 2019-12-18 10:05:34
问题 I want to differentiate the STDOUT and STDERR messages in my terminal. If a script or command is printing a message in terminal I want to differentiate by colors; is it possible? (E.g. stderr font color is red, and stdout font color is blue.) Example (using bold): $date Wed Jul 27 12:36:50 IST 2011 $datee bash: datee: command not found $alias ls alias ls='ls --color=auto -F' $aliass ls bash: aliass: command not found 回答1: Here's a hack that I thought of and it seems to work: Given the

Strange behavior of vim color inside screen with 256 colors

廉价感情. 提交于 2019-12-18 10:05:17
问题 I was trying to make the syntax highlighting (with 256 colors) of vim work inside screen , which is running inside gterm . It works quite fine in the beginning. What I mean by "in the beginning" is, after I start screen , and enter vim , the colors look fine, and there are really 256 colors. But after a while (I don't know exactly how long) the colors automatically change back to an appearance as if there are only 8 (or 16?) colors. For example, after this has already occurred, if I enter the