Currently, my zshrc looks like this influenced by this question and my other question what is currently working as expected it truncates the hostname and the username to constant values it dynamically truncates the entire PROMPT based on widthHelper() which allows me to resize my terminal and dynamically truncate the PROMPT Currently, I have this line working but not in
Tag: terminal
In Linux, are there any functions similar to CreateConsoleScreenBuffer/ReadConsoleOutput to read the terminal contents?
That is, how to create a new screen buffer and read/ write buffer contents in Linux? The screen buffer I am talking about refers to the content displayed to the user. Or the entire screen. I don’t want to use ncurses. I found terminfo, but I want a function instead of an command. Perhaps ioctl can read the buffer, but
How to adapt to Linux terminal back color in .NET 5/6?
We have a .NET 5 console application that runs on Windows/Linux/Mac. Our console application relies on the classic fore color scheme to highlight info/warning/error in console with fore colors gray/yellow/red. However we cannot gather the terminal back color as explained in Console.BackgroundColor documentation: Unix systems don’t provide any general mechanism to fetch the current console colors. Because of that, BackgroundColor
Ctrl+backtick not working in Linux based terminals [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
Looping over the last subdirectory to zip in linux terminal
given the following structure: How do I find & zip the last subdirectory in specific directories? The directory starts with ‘b’ (ex) ‘b1’, ‘b2’ Find the last subdirectory and zip it (ex) ‘b14’, ‘b22’ I want something like: The output has to be: Answer Pipe to tail -1 to get the last line.
Filtering on a condition using the column names and not numbers
I am trying to filter a text file with columns based on two conditions. Due to the size of the file, I cannot use the column numbers (as there are thousands and are unnumbered) but need to use the column names. I have searched and tried to come up with multiple ways to do this but nothing is returned to
Python: Run command for another software in terminal
I am using a software that my lab has developed, lets call it cool_software. When I type cool_software on terminal, basically I get a new prompt cool_software > and I can imput commands to this software from the terminal. Now I would like to automate this in Python, however I am not sure how to pass the cool_software commands onto
Current path is not showing in terminal for new CentOS user [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
CLPPLUS login failing
I am trying to login to remote DB2 using clpplus but can’t login as password contains @. clpplus -nw user/p@sswd@145.xx.xx.212:60000/Dbname but it fails saying: Is there any work around of it? Answer With the bash shell, enclose the password with ‘ and additionally escape the @ with @ (and the same for any special character inside the password, i.e. escape
How to list all concurrent python processes in my CLI?
I have opened several terminals in parallel: And in two of those terminals, I have launched a python file, which includes iterations, to keep the process running. And I would like to have the list of all python processes running. When I type: $ ps -ef | grep python or $ps -elf | grep python I only get the current