prompt

javascript prompt - adding variable in default text

For javascript prompt: prompt("Message", "default value in the text field"); is it possible to add a variable into the default value? For example: var default = 'default value'; prompt("Message", +default+"and other values"); The above example doesn't work as it shows 'NaN and other values' in the text field. I want the field to ...

Ruby Rails collection select is displaying blank "prompt" value?

I have a collection select like the following: <%= f.collection_select :region_id, Region.find(:all), :id, :name, { :prompt => 'Select a State/Province' }, :style => "width: 200px;" %> Sometimes the prompt from the :prompt option appears, but sometimes it does not. Does anyone know where I could begin to troubleshoot this? Maybe I h...

Lex/Yacc: Print message before input

Hi, I'm trying to figure out how I can display a message/prompt when using lex/yacc (flex/bison). For instance, main looks like so: int main(int argc, char *argv[]) { yyparse(); } Which calls yacc, which calls yylex(). This yields a blank line waiting on STDIN. How can i display a message like... message $ _ instead of _ Whe...

Coloring directory name in ksh

In my current situation, it is not unusual for me to have several UNIX computers I connect to, as several different users depending on the situation, and to traverse through various directories on the machines doing things. I use ksh through the entire thing. I was fiddling with my prompt recently, and I was able to get it to change som...

Unable to put "X" to RightPrompt to indicate many jobs in Zsh

I know the article which code does not work for me. I have pasted all its codes to my .zshrc. I have the following code in my .Zshrc RPROMPT='%{\[0;33m%}%1v%{\[0m%}' It should indicate whether you have jobs or not. However, it does not do that for me. I would like to get a X to the right prompt to indicate that you have a job open. ...

Visual SourceSafe 2005 integrated with VS2008 - missing checkin prompt for comment

I have been using Visual Studio integrated with Source Safe for years, when I checkin a file from the Solution Explorer in VS2008 I am not prompted for a comment when I previously I was prompted. To add a comment now, I go to the pending checkin view and add a comment that way. My guess at some point I must have accidentally changed some...

Create Java Command Console in JPanel

Hi All, I want to create a "Command Console" similar to the Windows Command Prompt, with command history, etc which is in a JPanel so that it can be added to a JFrame. What I want to do is present the user with the prompt to allow them to execute commands. What I have in mind is similar to the BeanShell Console, however I haven't be a...

Different bash prompt for different vi editing mode?

When using vi mode (set -o vi) with Bash, it would be nice to have a prompt that depends on the mode you are currently in (insert or command). How does one find out this editing mode? B.t.w, this seems to be possible in ZSH: ...

current directory doesn't appear in title bar when running under screen

My xterm $prompt variable in my .tcshrc is: set prompt="%{\033]0;%m:%~\007%}%{^[[;37;1m%}%B%{^[[;34;1m%}%m%{^[[;34;1m%}:%b%c%# " The highlighted part above (%{\033]0;%m:%~\007%}) puts the hostname (%m) and the current directory (%~) in the title bar. (At least I think that that's what puts it in the title bar; it's been a while since ...

Blackberry Permission Questions - "Prompt" acts differently on different devices

I have a few questions about permissions and prompts. Most importantly this has to do with making a data connection and using GPS QUESTIONS 1. Prompts & Allow - Remove Notice?: When installing my app (signed) on various devices, some devices prompt the user about making a data connection and some do not (the connection is just made). I...

json xhr response opens a download file popup window

Hi For one of our ajax request (with a .json response) some of our clients have complained that they are seeing a "File Download" prompt asking the user to download the .json response. I am baffled because considering that this is an xhr response, this should never happen. Has anyone seen this? Thanks ...

JQuery- hotkeys and windows prompt issue

By referring to http://jshotkeys.googlepages.com/test-static-01.html I try to implement this powerful tool and facing some issue. everytime when I click Ctrl S, it will popup a window prompt asking me whether I want to save my testing.html I want to ignore windows prompt. What I want is simple: 1. when people click save button/ use s...

To have extra info at a prompt for Git by Zsh

Torvalds seems to have the following prompt. [torvalds@g5 git]$ The first word is username. g5 seems to be a branch in Git repo, while git shows that it is a branch in Git. My current prompt PROMPT="$" How can you have a similar prompt as Torvalds'? ...

To get a prompt which indicates Git-branch in Zsh

I run the following codes separately as my prompt unsuccessfully in .zshrc. This suggests me that apparently I do not have a program called __git_ps1. It is not in MacPorts. #1 PROMPT="$(__git_ps1 " \[\033[1;32m\] (%s)\[\033[0m\]")\$"$ #2 PROMPT="$(__git_ps1 " (%s)")\$"$ #3 # Get the name of the branch we are on git_prompt_i...

To get Git-prompt work in Zsh without a bug in a function

This question is based on the thread. I have the following Git-prompt at the moment. I get the following warning after cding to a non-Git folder. fatal: Not a git repository (or any of the parent directories): .git fatal: git diff [--no-index] takes two paths fatal: Not a git repository (or any of the parent directo...

Shell Prompt Line Wrapping Issue

I've done something to break my Bash Shell Prompt in OS X (10.5.7) Terminal. This is the PS1 that I had configured: PS1='\[\e[1;32m\]\h\[\e[0m\]:\[\e[1;34m\]\w\[\e[0m\]\$ ' As far as I can tell I have the color commands escaping correctly. However when I scroll up and down in my command history I often get line wrapping issues if the...

Automatically timing every executed command and show in Bash prompt?

I often happen to forget to explicitly prefix executions with the "time" command, ideally I would see in the next shell prompt how much real time the last command took (on every command). I already scoured through the bash documentation, but couldn't find anything related. ...

jQuery - modify the prompt/alert functions

Hey, I need an advice, if it's worth it to downlaod a jQuery plugin (such as Impromptu), or if it's easier to make my own code just to modify the "prompt" efect. All I need is something like the first example of THIS. Or is there any other way, how to show a box of text in the midle of the screen, that stays there even when I move scrol...

In Windows cmd, how do I prompt for user input and use the result in another command?

I have a windows bat file which I would like to accept user input and then use the results of that input as part of the call to additional commands. For example, I'd like to accept a process ID from the user, and then run jstack against that ID, putting the results of the jstack call into a file. However, when I try this, it doesn't wor...

How can I automatically answer a password prompt from an embedded item in an (X)HMTL page?

I have written a web page that displays images from several servers on my network via simple img tags with appropriate href values. The servers require authentication before they will send the images. It works alright, except on first load the page presents the user with a series of password prompts (one for each server). The user c...