All Questions
12 questions
0
votes
0
answers
796
views
zsh module command not found
I recently switched from bash to zsh on CentOS 7. I am using oh-my-zsh
I'm encountering an issue where modules cannot be loaded from a script. When I manually load the module in the login shell, it ...
0
votes
0
answers
48
views
export -f function results in invalid options in zsh [duplicate]
I want to make my aliases available to sub-shells like this in my ~/.zshrc
say_hello() {
echo "Hello!"
}
export -f say_hello
However when I'm sourcing my ~/.zshrc I get this error:
~/....
1
vote
3
answers
4k
views
How do I make an alias for a command with sudo
I want to add two aliases, so one executes a command when non sudo, and the other executes a command when sudo, like this:
alias v = 'nvim'
alias 'sudo v' = 'sudo -E nvim '
I also have set alias sudo=...
0
votes
0
answers
433
views
Issue using Git Bash on Windows Terminal
Few months ago I installed zsh on git bash (Git for Windows), then I installed oh-my-zsh and Windows Terminal and everything was working fine. Recently, when I open windows terminal, I get an error ...
1
vote
2
answers
244
views
/root/.bashrc:157: = not found
#Get client IP base on current logged in user
if [ $USER == 'root' ]
then
ip="$(last | awk 'NR==1 {print $3}')"
else
ip="$(echo $SSH_CONNECTION | cut -d " " -f 1)"...
2
votes
1
answer
610
views
ZSH extends bash autocompletion
It's possible to make ZSH extends bash autocompletion? Bash can autocomplete almost every command in the system, and in ZSH i always need to enable a plugin for it.
Here is an example (ignore the ...
0
votes
1
answer
5k
views
Multi-user env, SSH ZSH - command not found: shopt
I just installed ZSH on a remote server where we are 2 "admins".
I switched my default shell to ZSH with chsh -s $(which zsh). echo $SHELL gives the output /usr/bin/zsh which proves it.
But, when I ...
0
votes
2
answers
417
views
How do I alias history 20 to work the same way in zshell vs. bash?
Seems like history [number] is backward in zshell because it's using fc. How do I get history [number] to behave like it does in bash?
➜ exec bash
bash-3.2$ history 3
35 history 5
36 exit
...
6
votes
4
answers
15k
views
Changing directory color with zsh + Prezto
I am using Prezto + zsh as my shell. I would like to change the color of directories when I ls my directory.
For instance, here is what I currently have:
Obviously, this is no fun, as I'm hardly able ...
2
votes
1
answer
91
views
Is there any plugin for zsh or bash that does heuristic filename completion?
Such as if
$ ls
program_v1.21.rb
program_v2.01.rb
program_v2.01_final.rb
so when I
$ echo progv2fin[TAB]
it completes to
$ echo program_v2.01_final.rb
Sure there must be something, but I haven't ...
12
votes
3
answers
2k
views
Completion of words on the screen as in VIM (Bash or Tmux)
How can I configure Bash, Zsh or Tmux to complete the last matching identifier on the screen? Consider this common scenario:
$ git fetch
remote: Counting objects: 16, done.
remote: Compressing ...
28
votes
11
answers
124k
views
After installing oh-my-zsh: ... /.zshrc:source:34: no such file or directory ... /.oh-my-zsh/oh-my-zsh.sh
I just tried to install oh-my-zsh. I get the following error when I try to run rvm:
zsh: command not found: rvm
I also get the following error when I try to open a new tab:
/Users/jack/.zshrc:...