Questions tagged [prompt]

The prompt is what asks a user for their interactive input

Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

Remove new line from batch prompt

I have the following prompt: PS1="\[\033[s\033[0;0H\033[0;41m\033[K\033[1;33mCWD:\w | \d | \t | CM: \# | \V\s\033[0m\033[u\] <\[\033[0;32m\]\u@\h\[\033[0m\]>\$" Everytime I type a ...
0
votes
0answers
10 views

How to customize the bash prompt in a way that doesn't squash venv

I was a long time tcsh user and I have used a custom prompt, which includes the date/time, host, and a largish path. In the past, when I've used venv, I would switch to bash first, just because ...
0
votes
0answers
10 views

Use tar -czvf command to create zip file, but when I open zip archive there is file without extension

I Use tar -czvf command to create zip file, but when I open zip archive there is file without extension. The problem is when I copy this zip file to USB flash drive it gives me this error - Please ...
0
votes
1answer
51 views

How to reference to or copy any parameter on the same command line in Powershell?

How to reference to the path parameter on same command line in Powershell? Is there a keyboard shortcut or builtin variable that allows to copy or reference to any parameter on the same command line? ...
1
vote
1answer
38 views

ZSH prompt: path except current dir

Can zsh set the prompt to the whole path except the current dir? I.e. for ~/a/b/c/ to just ~/a/b/? I'm trying to get this result for ~/a/b/c with left & right prompts: c/: | ~/a/b/...
0
votes
1answer
18 views

Weird shell prompt (PS) in shell scripts running under another shell type

When I run a #!/bin/sh script containing set -o xtrace in an interactive zsh I get weird output looking like %F{red}>> %f. Obviously the PS4 of my .zshrc is used but the interpreting shell is sh....
2
votes
0answers
83 views

PowerShell prompt color issue

I tried this: How to colorize the Powershell prompt? function prompt { $ESC = [char]27 "$ESC[46mPS $($executionContext.SessionState.Path.CurrentLocation)$('>' * ($nestedPromptLevel ...
1
vote
1answer
30 views

Git branch name is not updated on terminal prompt when checking out another git branch

I'm having this command to set prompt in Bash terminal with Git branch name: export PS1="\w $(git branch | grep '*') " It shows the correct Git branch name for the first time after running ...
0
votes
0answers
16 views

Terminal color codes not working as expected

I am using the following code in my ~/.bash_profile following some online blogs. export CLICOLOR=1 export LSCOLORS=GxFxCxDxBxegedabagaced export TERM="xterm-color" export PS1='\[\033[1;32m\]$...
0
votes
1answer
49 views

tmux prompt misaligned in intellij terminal window

Why is it misaligned? I also see that tmux is not honoring set -g default-shell "/bin/bash" or set-option -g default-command "reattach-to-user-namespace -l bash"
0
votes
3answers
96 views

PowerShell replace $env:USERPROFILE in prompt

I mean to get in my PS 5.1 prompt ~\Documents instead of C:\Users\USER1\Documents But while trying one of the "building blocks" I get an error > $($executionContext.SessionState.Path....
3
votes
1answer
133 views

Interactive ZSH's command prompt to execute a ZLE command

Is there any way to interactively run a ZLE command on the current line? I am looking for a similar way to TMUX's command-prompt, which default keybinding is prefix : were you can run a TMUX command ...
0
votes
1answer
22 views

Is there a way to create a command prompt shortcut open as administrator and start in another drive and folder on that server?

I would like to create a cmd.exe shortcut that will open as administrator. I have already done this. The default place it opens is on the C:\Windows\system32. I want it to open on E:\\bin instead. ...
1
vote
1answer
119 views

Windows, how to run a command that would self execute a file every 10 seconds for a duration and append all output to a log file

I need a batch script or a one liner to run an executable and append its output from console to a text file I also need this to run in a loop and dump the output every 10 seconds for a duration of 10 ...
2
votes
1answer
67 views

Recalling last command inserts spurious character at the beginning (in Zsh)

The interactions are so complex that I don't know exactly what I'm looking for, but maybe you can still help. Sometimes, generally after an error (return code > 0), when recalling some last command, ...
0
votes
1answer
67 views

Getting rid of “command not found…”

When I mistype command in terminal I got this error: bash: XX: command not found... After that, I have to wait or use keyboard interrupt before I can use prompt again. Sometimes shell offers me to ...
1
vote
1answer
2k views

Is there a way to make Windows Powershell 6 my default terminal?

I downloaded pwsh 6, or pwsh core, and wanted to make it default. Currently whenever I use the shorcut for a CMD, I already get the old pwsh, but I wanted to use the new one instead. Is there anyway ...
0
votes
0answers
729 views

after ssh connecting to ubuntu server, cannot do anything

I was working on a server I have access to for a school project, which I am not an admin of it, and everything was working fine until recently, when this suddenly began to happen after I logged in ...
4
votes
1answer
294 views

What's the easiest way to prepend the current time to the fish prompt?

I'd like to see the current time in my fish prompt so that I can always see for example when I started the last command. I don't want to install extensions.
1
vote
1answer
227 views

ssh login causes repeating characters in my zsh

I am on a Mac using iTerm2 and zsh v5.7.1. When I login from my local computer to the remote computer using 'ssh', most of the characters are repeated at the prompt as I type. Clearing the line with ...
0
votes
1answer
282 views

How to get the length of a prompt?

Is there a way that I can determine the length of a prompt? Is there a way that I can look at the PS1 variable and get the length from it and repeat characters for the same length? I am trying to ...
0
votes
1answer
90 views

Update Terminal Prompt Hostname “On The Fly” without reboot

I am not asking how to change a hostname and I am not asking how to update a terminal prompt. What I am asking is how to update a terminal prompt from a bash script so that when the user exits the ...
1
vote
1answer
49 views

zsh-git-prompt customization of path

source ~/zsh-git-prompt/zshrc.sh PROMPT='%B%m%~%b$(git_super_status) %# ' I have the default configuration for zsh-git-prompt as shown above In my prompt it outputs: cmuench-air /Applications/MAMP/...
1
vote
0answers
88 views

Terminal on MacOS Mojave: Why is the prompt misbehaving when the window size is too small and how do I fix it?

I'm on macOS Mojave 10.14.4 using GNU bash, version 5.0.7(1). Basically my issue is that when the terminal window is too narrow to contain my full PS1 prompt in one line, it gets corrupted and starts ...
0
votes
2answers
43 views

PS1 Customization

Just a quick one. Trying to modify my PS1 to show just a specific number of chracters. Currently : user@domain.co.uk@linuxhostname This is because I have just intergrated some systems in my ...
1
vote
1answer
62 views

What are environments for in Anaconda prompt?

What do environments do in Anaconda Prompt? What happens when I create/activate a new environment? And why is it useful?
1
vote
1answer
92 views

mysql 5.7.27 command line prompt shows un-escaped characters

I'm using mysql 5.7.27 in CentOS 7, and I want a colorful prompt in command line. I found a solution here. But it doesn't work for my environment. alias penguins=$(echo -e 'mysql --prompt="\x1B[31m\\...
0
votes
1answer
77 views

What is the windows cmd prompt command to -> List 'n' file names in console from a directory having 100 files

I have a directory having 100 .txt files. I need windows command ( Unix equivalent : head cmd) to list, say only 10 files in my console
0
votes
0answers
6 views

redirect logs without capturing the interactive prompt

I launch a command which prints many messages (errors, warnings, etc.) before dropping me into an interactive command prompt: $ verbose_tool launching foo (error) blabla (warning) blablabla ...lots ...
3
votes
1answer
864 views

Move vi mode string to end of bash prompt

I use vi editing mode in bash. I have "show-mode-in-prompt" set to "on" in ~/.inputrc. show-mode-in-prompt (Off) If set to On, add a string to the beginning of the prompt indicating the ...
1
vote
0answers
1k views

Run Runas without password prompt

First of all, I'm sorry to register a new question when there are a few about the same subject, but I couldn't find a specific answer... I'm trying to create a batch file to be used by a regular user....
0
votes
1answer
10 views

How to not return immediately to shell when VSCode is executed from shell

When I open a file in VSCode form Bash by typing code ${FilePath} it returns immediately i.e. I can start typing next command before closing the file. If I do the samething with other editors like ...
0
votes
1answer
452 views

bash prompt: show current directory at end of line

How to make my bash prompt display something at the end of the line (with the cursor positioned as usual at the beginning of the same line)? Specifically I want to display an abbreviated single ...
1
vote
1answer
63 views

zsh Prompt expansion: Why does %b cancel background colour?

I'm running Zsh 5.2 on MacOS, running in Terminal.app with TERM set to xterm-256color. When styling the PROMPT, I found that in this Zsh version, a %b cancels the effect of a previous %K. Consider ...
0
votes
1answer
80 views

Why does Krusader add a ^@ to all Useractions when running in the embedded terminal only?

It looks like the Krusader File Manager appends a ^@ character (which is CTRL-@, that is a null char) every time it runs a Useraction but only if it's run in the embedded terminal. This then leads ...
-1
votes
1answer
26 views

How do I stop the result of %@EXEC[] being included in my prompt?

Per commentary to https://retrocomputing.stackexchange.com/a/9623/1932: I have tried %@EXEC[] to run a BTM from my prompt in 4DOS/4OS2/4NT/Take Command/TCC, but the return value of the BTM ends up in ...
1
vote
1answer
431 views

Prompt for Input Inside For Loop

I have a directory that can contain over a hundred files. I want to create a loop that will go through each file in that directory and ask the user if they want to process the next file or exit the ...
0
votes
0answers
433 views

How can I display path on right side of terminal screen instead of before prompt?

I'd like to show the current working directory on the right side of screen in bash terminal and no path before the prompt where it is shown now. Ubuntu 18.04 LTS
5
votes
0answers
739 views

Avoiding the `npm login` (`npm adduser') email prompt in npm & jFrog artifactory

When I do npm login (alias of npm adduser) I ALWAYS get prompted for my email address. Username: ... Password: ... Email: (this IS public) ... This is obnoxious. I've done npm config -g set email .....
0
votes
1answer
91 views

Watch terminal for a particular prompt and automatically enter the response

I am using ZSH and I am wondering whether there is a way of watching the stdout for a particular prompt and then automatically input the response? In particular I would like to automatically populate ...
3
votes
2answers
1k views

Powerline and Fish: How can I remove the large whitespace between the shell prompt and cursor?

I recently started using Arch Linux and just installed Powerline and Fish (version 3.0.0) last week. In my terminal, which is Termite (version 14), there's a large (horizontal) space between the shell ...
2
votes
1answer
102 views

What's wrong with this PS1-Prompt?

I was styling my PS1-Prompt to resemble the iPython-Prompt as: PS1FIRSTLINE="\[\n\][\t] \[\e[1m\e[38;5;196m\]\u@\H\[\e[0m\] in \[\e[1m\e[38;5;196m\]\w\[\e[0m" PS1SECONDLINE="\n\e[92m\]In [\[\e[1m\]\#\...
0
votes
0answers
96 views

Bash Output-Prompt

So i'm customizing my PS1-Bash-Prompt at the moment and found the iPython way of displaying in- and output pretty neat. As you can see, i have my PS1-Prompt configured to look (almost) like the ...
1
vote
0answers
86 views

Why does my PS1 environment variable keep getting overwritten?

I'm trying to customize the prompt by adding a line such as export PS1='%d' to my .zshrc file. However the environment variable keeps getting overwritten. In fact I can do the following at the ...
1
vote
1answer
260 views

How to stop Dell notification on my computer?

This annoying message comes up all the time. Even when I press "Do not remind me", it keeps coming. How can I get rid of it for good?
1
vote
0answers
145 views

How to redirect the output of a running process to a log file?

When running a long running task in a command prompt, it's possible to redirect the output to a log file (fe for storage or later analysis). However, I started a few long running tasks this evening ...
0
votes
1answer
384 views

cmder: How to add time taken since last command

as discussed already here on SU there is a way to output the current date and time in cmder. In some videos on Youtube i saw some people installing something or get node.js ready or any other command ...
1
vote
2answers
847 views

linux text editor with no prompt autosave and restore? [closed]

I am looking for some way to take ad hoc notes on linux where I don't need to explicitly save those notes. On windows, I use Notepad++ that has a feature where new, untitled documents are ...
1
vote
1answer
331 views

%2 in batch file is ignored on execution in command prompt

I have an image file named first%20second.png I have a test.bat file that renames images. It looks like this: Timeout 3 Copy "C:\first%20second.png" "C:\sub\first%20second.png" Timeout 3 When the ...
0
votes
2answers
362 views

Outlook BCC prompt VBA doesn't automatically run

I'm still pretty new to VBA (so sorry if this is a dumb question) though I am already coding small applications a few years for like buttons in excel or something. But this one has never ben clear to ...

1
2 3 4 5