command-line-interface

Variable names in prompt instead of path

有些话、适合烂在心里 提交于 2019-12-11 04:28:39
问题 How can I prevent my zsh prompt from showing the variable name a path is assigned to instead of the path itself? foo="/some/path" cd "$foo" shows $ ~foo/ in my prompt instead $ /some/path/ 回答1: From the comments: you're seeing Named Directories. Check if AUTO_NAME_DIRS is set ( setopt | grep AUTO_NAME_DIRS ) - to disable this functionality, turn it off. 来源: https://stackoverflow.com/questions/16203555/variable-names-in-prompt-instead-of-path

Gitlab merge a merge request from command line not generating any commit(no fast forward)

你离开我真会死。 提交于 2019-12-11 04:26:34
问题 I am trying to Merge a Merge Request manually from command line . In the merge window of Gitlab, there is already some codes are present to do that. Whenever I merge a request from the Gitlab website, it generates a merge commit, which is known as --no-ff commit. But when I am trying to do that manually, it is not generating any extra commit although I have specified the --no-ff option in command line. Any suggestions? I have already tried with the commit amend option as well. git fetch <Fork

Utilizing Async/Await in .NET Console applications breaks when calling Application.Run() or instantiating a WinForms UserControl object

為{幸葍}努か 提交于 2019-12-11 04:08:57
问题 Background Async/Await facilitates responsive applications in .NET by automatically creating a "state machine", allowing the primary thread of an application to remain responsive even while performing blocking work. Windows Forms, WPF, and ASP.NET (to my knowledge) all incorporate a form of SynchronizationContext (although ASP.NET may have removed this recently; I'm not positive, as I don't work with it.) I've recently needed to extend a Windows Forms application to also support accepting

deploy maven project from the CLI?

一曲冷凌霜 提交于 2019-12-11 04:05:50
问题 builds and runs fine from within the IDE: cd /home/thufir/NetBeansProjects/HelloMaven; JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 /home/thufir/.local/share/umake/ide/netbeans/java/maven/bin/mvn "-Dexec.args=-classpath %classpath net.bounceme.dur.hello_maven.Main" -Dexec.executable=/usr/lib/jvm/java-8-openjdk-amd64/bin/java process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec Scanning for projects... ------------------------------------------------------------------------ Building

How run a windows console for JavaScript

女生的网名这么多〃 提交于 2019-12-11 04:04:04
问题 I would like to have a console window (a command line) on Windows 7 which will allow me to play with JavaScript just like a python console. Update: It's important to have a file access from within the console (or script run through it). 回答1: You can use Node.js's REPL. To do so follow this steps: Download and Install Node.js. Call Node.js from the Start Menu / Start Screen or directly node.exe installation path (e.g C:\Program Files\nodejs\node.exe ). Enjoy! You may want to add the

How to install pthreads on a phpfarm php installation

99封情书 提交于 2019-12-11 03:42:23
问题 Documenting my struggles to help others and hopefully get some feedback on how I could have done it better. The command pecl install pthreads fails due to the php installed on my ubuntu 13.04 box not having zts configured. Options: 1) The ubuntu respository does not have a php package with zts enabled. As of this post, ubuntu only has php 5.4.9 in it's repository (Released: 22 Nov 2012). It is possible to compile a php version from source - which I eventually did (see below), but.. 2) I ..

How to display a custom prompt during the execution of C program?

不羁岁月 提交于 2019-12-11 03:24:43
问题 I'm trying to emulate a terminal using a C program in Linux and need my program to display a custom prompt while the program executes. Is there a way to display it using my C program? (I can always try to printf "My-prompt" every line manually, but I'm looking for a better way). Also I can't use any additional libraries other than the basic ones so GNU Readline library and editline library wouldn't work (as suggested in another thread). for example: user@mypc:~$ ./a.out my_custom_prompt>3+5

Make a command available for two groups in python click?

こ雲淡風輕ζ 提交于 2019-12-11 02:50:46
问题 I'm using click to write a cli program in Python, and I need to write something like this: import click @click.group() def root(): """root""" pass @root.group() def cli(): """test""" pass @root.group() def cli2(): """test""" pass @cli.command('test1') @cli2.command('test1') def test1(): """test2""" print 1234 return root() but this will fail with: TypeError: Attempted to convert a callback into a command twice. How can I share the command between multiple groups? 回答1: The group.command()

“readline” (or “haskeline”) for Curry?

寵の児 提交于 2019-12-11 02:48:47
问题 What's the most practical way to write a program in Curry programming language that would have a console UI with decent line editing? Actually, I need to pass a string as a suggestion for the user's input, then let the user edit it in the console, and receive his edited variant back, process it (w.r.t. to the current state of the process), then loop. I like readline-like/haskeline-like editing. (And BTW haskeline in its latest version (0.6.4.0) has exactly the API for what I want: read a line

Redirecting Windows dialog error messages to console

淺唱寂寞╮ 提交于 2019-12-11 02:48:25
问题 Does anyone know how to redirect/capture modal Windows error dialogs? This is really problematic for non-interactive, command-line programs that are merely trying to run a program and capture the exit code and stdout/stderr output. The most recent instance of this issue is a modal Windows dialog that has the following form: The program can't start because <foo.dll&gt is missing from your computer. Try reinstalling the program to fix this problem. (Where the title of the modal GUI window is