Looking for a shell-only[1] way to take this list of dirs: And return it sorted numerically, with the subdirs showing up right after their parent: (*|*/bar)(n) is rejected as a bad pattern, while */{,bar}(n) expands to */(n) ~/bar(n) so the subdirs show up at the end. [1] I need this to be able to work on a wide variety of
Tag: zsh
How to make zsh `run-help` to ignore `sudo` and get help about the following command
Is it possible to customize zsh so that when I type, say, sudo ls and then hit Alt-h to see man page of the command ls. The default behavior of run-help is to show me the man page of the command sudo, instead of ls. Answer Yes, you can. Run the following lines or add them to your .zshrc. from
Can not assign function parameters to local array variable in `Zsh`
I just try to assign parameters of function as local array variable, I tried I got But if I remove local keyword It’s work What is a problem here? How can I keep my array to local variable? Additional information I tried this on bash shell, it’s work well either as local or global variable. Answer In order to make
django settings.py os.environ.get(“X”) not fetching correct values
I am trying to access and fetch (get) value of OS Environment variable into settings.py and while debugging application I get None value for that record. Here are more details: There are some important/secret keys which can’t be shared in code so those are exported in OS environment variables. Whenever I do echo $KEY_VAL from linux terminal or python shell
Obtaining file names from directory in Bash
I am trying to create a zsh script to test my project. The teacher supplied us with some input files and expected output files. I need to diff the output files from myExecutable with the expected output files. Question: Does $iF contain a string in the following code or some kind of bash reference to the file? Note: Any tips
bash command not found when setting a variable
I am writing a shell script where I am setting few variables, whose value is the output of commands. The errors I get are: now, I did read other similar questions and based on it, I tried various things: spliting command into two calls tried using backticks tried using $() But in every case the command output is getting executed.
SSH – Entering a Passphrase Only Once
On $ ssh localhost, I was being asked to provide password. It was tedious and kind of annoying to provide password for every login. So, I have created ssh keys with passphrase.. I have copied the content of the ~/.ssh/id_rsa.pub to ~/.ssh/authorized_keys Now, on $ ssh localhost I was being asked to provide passphrase. No improvement, but instead of providing
Backspace in zsh fails to work in quite the strange way
I’m on a fresh Virtualbox install of CentOS 6.4. After installing zsh 5.0.2 from source using ./configure –prefix=/usr && make && make install and setting it as the shell with chsh -s /usr/bin/zsh, everything is good. Then some time after, after installing python it seems, it starts acting strange. Happens with PuTTY and iTerm2 over SSH, does not happen on