Skip to content

Instantly share code, notes, and snippets.

@emreberge
Created December 2, 2011 20:25
Show Gist options
  • Save emreberge/1424710 to your computer and use it in GitHub Desktop.
Save emreberge/1424710 to your computer and use it in GitHub Desktop.
Bash help function for using with oh-my-zshell
function help(){
bash -c "help $@"
}
@emreberge
Copy link
Author

Solves the following problem on oh-my-shell:

$ help echo
zsh: command not found: help

With function:

$ help echo
echo: echo [-neE] [arg ...]
    Output the ARGs.  If -n is specified, the trailing newline is
    suppressed.  If the -e option is given, interpretation of the
    following backslash-escaped characters is turned on:
        \a  alert (bell)
        \b  backspace
        \c  suppress trailing newline
        \E  escape character
        \f  form feed
        \n  new line
        \r  carriage return
        \t  horizontal tab
        \v  vertical tab
        \\  backslash
        \0nnn   the character whose ASCII code is NNN (octal).  NNN can be
            0 to 3 octal digits

    You can explicitly turn off the interpretation of the above characters
    with the -E option.

@juliandkatz
Copy link

This helped me! Thanks!

@Symbolk
Copy link

Symbolk commented Feb 13, 2020

This helped me! Thanks!

How to config on-my-zsh to use this function?

@emreberge
Copy link
Author

emreberge commented Feb 13, 2020

How to config on-my-zsh to use this function?

You can append the code to your ~/.zshrc file, then restart your terminal.

@Symbolk
Copy link

Symbolk commented Feb 15, 2020

How to config on-my-zsh to use this function?

You can append the code to your ~/.zshrc file, then restart your terminal.

Thanks!

@guiji56
Copy link

guiji56 commented Nov 27, 2021

thanks

@meowfishorg
Copy link

Thanks +1!

@alexdemenezes
Copy link

Thanks!

@hustnzj
Copy link

hustnzj commented Mar 26, 2023

Thanks!

@akashgreninja
Copy link

Thanks a lot

@sanna-smarter
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment