Unanswered Questions
2,391 questions with no upvoted or accepted answers
18
votes
2
answers
4k
views
zsh can't input to terminal when piping stdin and stdout with variable command that has tty output
System info:
macOS Sierra 10.12.6
zsh 5.4.2 (x86_64-apple-darwin16.7.0)
GNU bash, version 4.4.12(1)-release (x86_64-apple-darwin16.3.0)
Scroll to the EXAMPLES at the bottom if you just want to dig in ...
6
votes
0
answers
2k
views
Execute script on external keyboard connection
EDIT: This is NOT a duplicate because the linked question is about external USB drives, not keyboards. The suggested command udevadm info -a -n sdb does nothing in helping to find the corresponding ...
6
votes
1
answer
2k
views
custom zsh autocomplete
I'd like to write a zsh completion for pytest.
Where do I Start? I'm using oh-my-zsh.
in .zshrc:
fpath=($HOME/.mycompletions $fpath)
autoload -U compinit && compinit -u
in $HOME/....
6
votes
0
answers
3k
views
Making zsh filename completion case-insensitive everywhere
I have the following line in my zshrc to make filename completions case-insensitive:
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
This works most of the time but I’ve noticed that if I ...
5
votes
0
answers
109
views
Subsequent "git clone" commands influencing each other?
I'm currently part of a migration from GitLab to Azure DevOps. As part of that I wrote a little bash script that iterates over the migrated git repos and for each performs a clone from both gitlab and ...
5
votes
1
answer
693
views
bash + how to avoiding duplicate entries in authorized_keys (ssh) in bash
Popular methods of adding an ssh public key to a remote host’s authorized_keys file include using the ssh-copy-id command, and using bash operators such as >> to append to the file.
An issue ...
5
votes
0
answers
599
views
Is job-control really meant to be supported in subshells and scripts?
Small premise
I use subshells quite often to perform operations that involve changing the Shell Execution Environment, so as not to affect the main shell. I do it often from an interactive shell, and ...
5
votes
1
answer
583
views
How to create a real copy of file descriptor stdout and stderr without using unbuffer / script / tee just with bash built-ins?
My goal is to duplicate, redirect all output (stdout and stderr) of an
application (apt-get) to a file while retaining the usual behavior of
the application (apt-get), stdout and stderr.
How to ...
5
votes
0
answers
2k
views
Launch background process from sh and close the terminal
How can this be achieved in sh (not bash!)?
nohup sh -c 'helper-bcpy.sh "$0" "$1" "$2" "$3"' "$num" "$full_path" "$log" "$log_finished" >/dev/null &
I would have expected it to send the ...
5
votes
0
answers
948
views
Can I prevent zsh slowing with a large history?
I've just migrated from bash to zsh. I converted ~/.bash_history for use in zsh. It's 150 000 lines long. bash is almost instantaneous to start up, but zsh is now fairly slow, taking half a second to ...
5
votes
1
answer
2k
views
TOR hidden service not always accessible through cURL. Takes multiple tries
When I try to access a hidden service on TOR using cURL, for some reason I'm not getting access to the site 100% of the time. Many times it returns "curl: (7) Can't complete SOCKS5 connection to 0.0.0....
5
votes
2
answers
2k
views
Bash Script -- ffmpeg not being invoked as expected
I'm working on a bash script to convert my music library to ogg* but executing the right command is somehow eluding me. This is the line that should accomplish it:
ffmpeg -i "${file}" -f flac pipe:1 |...
5
votes
1
answer
479
views
How to overwrite file residing on ESP at Linux boot
I have a 64-bit dual-boot system running Windows 7 and Linux Mint 17 Cinnamon. I use rEFInd to graphically choose which system to boot.
A little bit about rEFInd:
It is an EFI bootloader.
It uses ...
5
votes
2
answers
774
views
dash maximum variable length under systemd
I have a shell script that uses a single variable as an associative array (one KEY=VALUE per line).
Throughout the execution of the script, the variable is manipulated to add, remove or modify ...
4
votes
0
answers
96
views
Recovering text of Unsaved document from process memory? (frozen Xed window - process still "running" but in Sleeping status)
The window of my text editor Xed froze with Unsaved documents just as I was doing 'File'->'Save as...' to save them... [How ironic.]
Since the process still exists, I am trying to recover the text ...