Questions tagged [zsh]

68 questions
1
vote
1 answer

Toggle Foreground Process

Ctrl-z suspends the foreground process, but when there is nothing in the foreground it has no effect. I want to overload ctrl-z so when there is nothing in the foreground it brings the most recently suspended process back. This way, hitting ctrl-z…
Blake Taylor
  • 113
  • 3
1
vote
2 answers

why won't bash display the results of a 'bind -p' command?

bash refuses to give me the output of 'bind -p' when I pass it in with the -c switch: bash -c 'bind -p' but it works to type bind -p directly at the bash prompt, and it works to type something like bash -c 'echo "hi"' and zsh happily does…
iconoclast
  • 1,800
  • 2
  • 18
  • 30
1
vote
1 answer

Running Job and Paused Job Writing to the same File

So I ran tcpdump twice overnight by accident, both outputting to the same file. However, I ran them as jobs and one of them has been paused the whole time. Anyone have a recommendations on how to keep the file? So far I have thought of: kill -9…
Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448
1
vote
1 answer

zsh completion ( compctl ) does not trig for command names containing dashes

I've used zsh compctl since forever (late 90s or early 00s) but strangly never run into this before. I realized today when I intended to make some compctl config for update-alternatives that my completions where not trigged at all, it just used my…
fraxflax
  • 76
  • 6
1
vote
1 answer

The ssh-agent process is not visible to the user who created it but is visible to root

I have adopted the following snippet from Visual Studio Code's documentaion to create an ssh-agent on login: if [ -z "$SSH_AUTH_SOCK" ]; then # Check for a currently running instance of the agent RUNNING_AGENT="`ps -ax | grep 'ssh-agent -s' |…
Matt
  • 111
  • 4
1
vote
0 answers

Netcat on MacOS failing with simple commands

I'n trying to follow a tutorial here. As an example we can say that we need a friend of ours to help us with something on our work system(Windows). To be able to receive a connection from us first our friend would need to set up a listener. nc…
1
vote
0 answers

debugging zsh completion method

I am trying to debug a completion method. This method is supposed to present with all the directories within these three folders. I verified that compinit is loading it correctly. tried tracing and i can't decypher most of it. here is my…
scphantm
  • 203
  • 1
  • 11
0
votes
1 answer

Why does $SHELL point to /bin/bash if running zsh inside bash?

If I run zsh inside bash (on macOS Sierra), why does $SHELL still point to /bin/bash, rather then /bin/zsh? $ echo $SHELL /bin/bash $ zsh % echo $SHELL /bin/bash
otto.poellath
  • 545
  • 1
  • 5
  • 9
0
votes
1 answer

zsh substitution, can't do regex with repetition

I'm trying to perform ZSH variable substitution, but I'm having to do it the lame way, by piping through cut. Is it possible to perform this operation entirely within…
bryan_basho
  • 91
  • 1
  • 5
0
votes
2 answers

bash script to create user then create ssh keys

Please note I am a total linux newbie, please bare that in mind when answering this question as I have very limited knowledge of linux. OS: Debian Squeeze I am using ZSH and have created a function called webuseradd it looks like this: function…
George Reith
  • 673
  • 2
  • 12
  • 22
0
votes
1 answer

Mounted directory is shrinking

This is a bit strange. I have a ZSH mounted network directory in a Redhat VM and it appears to be shrinking: [aramk@server-C production]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 8.7G 7.2G 1.1G 87%…
0
votes
4 answers

How to automatically clean up date stamped logs

I have an apache web server with various virtual hosts. Each virtual host logs to date stamped files using cronolog. The result is that I end up with a lot of files like this: ----rw-r-- 1 root root 467894 2013-02-01 13:43…
Thomas
  • 175
  • 3
  • 9
0
votes
1 answer

ZSH escaping / file matching pattern

This works from command line: scp -r ^.git b:/home/wopi/blyzics/. when I paste the above line in a script like this: #!/usr/bin/env zsh scp -r ^.git b:/home/wopi/blyzics/. And run it ./deploy.sh I get: ^.git: No such file or directory Why ?
astropanic
  • 307
  • 2
  • 5
  • 18
0
votes
1 answer

Declare my own script to execute file

I have two files, the first is 'ax': #!/usr/bin/env zsh print "Params: $*" cat $* And another one 'tst': #! /home/me/ax A B C When I am in sh/csh/bash shell: > ./tst ./tst: line 2: A: command not found ./tst: line 3: B: command not found ./tst:…
yogsototh
  • 103
  • 4
0
votes
1 answer

Use `known-hosts-files` for `zsh` ssh command completion

This question was originally asked on SO, which is incorrect. As I was not able to (get it) moved to serverfault, I am re-asking it. I am trying to configure tab completion for the ssh command in zsh to use an additional known_hosts file (which not…
Andreas
  • 1
  • 1