-1

After I Updated Oh my bash this error, and every time I start the console it appears. This causes me to lose all things from oh my bash. It shows some syntax errors, but I don't know how to solve them.

    : command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
-bash: /home/luismanzur/.oh-my-bash/lib/utils.sh: line 75: syntax error near unexpected token `$'{\r''
'bash: /home/luismanzur/.oh-my-bash/lib/utils.sh: line 75: `function _omb_util_setexit {
_omb_util_glob_expand: command not found
: command not found
: command not found
-bash: /home/luismanzur/.oh-my-bash/aliases/general.aliases.sh: line 26: syntax error near unexpected token `$'{\r''
'bash: /home/luismanzur/.oh-my-bash/aliases/general.aliases.sh: line 26: `function _omb_alias_general_cp_init {
_omb_util_function_exists: command not found
_omb_util_glob_expand: command not found
_omb_util_add_prompt_command: command not found
_omb_util_command_exists: command not found
(base) luismanzur@tululo:~$

How can I solve it?

  • Are you using bash or zsh? oh-my-zsh is for zsh. – Barmar Sep 15 '22 at 23:36
  • 1
    It looks like your file has DOS newlines. Use `dos2unix` to fix it. – Barmar Sep 15 '22 at 23:37
  • See ["Are shell scripts sensitive to encoding and line endings?"](https://stackoverflow.com/questions/39527571/are-shell-scripts-sensitive-to-encoding-and-line-endings) for more info about DOS/WIndows line endings and how to fix them. – Gordon Davisson Sep 16 '22 at 04:08

1 Answers1

0

display/attach the contents of

utils.sh

and

general.aliases.sh

Using google search I found:

https://gitcode.net/pattern/ohmybash/oh-my-bash/-/blob/master/aliases/general.aliases.sh?from_codechina=yes

content being:

#!/usr/bin/env bash
alias cp='cp -iv'                           # Preferred 'cp' implementation
alias mv='mv -iv'                           # Preferred 'mv' implementation
alias mkdir='mkdir -pv'                     # Preferred 'mkdir' implementation
alias ll='ls -lAFh'                         # Preferred 'ls' implementation
alias less='less -FSRXc'                    # Preferred 'less' implementation
alias nano='nano -W'                        # Preferred 'nano' implementation
alias wget='wget -c'                        # Preferred 'wget' implementation (resume download)
alias c='clear'                             # c:            Clear terminal display
alias path='echo -e ${PATH//:/\\n}'         # path:         Echo all executable Paths
alias show_options='shopt'                  # Show_options: display bash options settings
alias fix_stty='stty sane'                  # fix_stty:     Restore terminal settings when screwed up
alias fix_term='echo -e "\033c"'            # fix_term:     Reset the conosle.  Similar to the reset command
alias cic='set completion-ignore-case On'   # cic:          Make tab-completion case-insensitive
alias src='source ~/.bashrc'                # src:          Reload .bashrc file

26th line being valid:

alias path='echo -e ${PATH//:/\\n}'         # path:         Echo all executable Paths