bash - Failure with creating custom alias in ubuntu 14.04 -
I am running Ubuntu 14.04 on my computer and I am trying to create a custom nickname so that I can get the ghc (Haskell Compiler ). I tried to edit the .bash_aliases file and added the commands:
alias ghci1 = 'ghc_home = $ HOME / development / bin / ghc' alias ghci2 = 'path = $ ghc_home / bin : $ {PATH} 'nickname ghcis =' ghci '
This is the whole thing to do because I installed 7.8.0 GH and every time I want to open the GHC, let me first The command is to write, otherwise I get this error that ghc is not installed on my computer.
When I open a terminal after editing the .bash_aliases file, I get the message:
Bash: alias: =: not found bash: alias: = : Not found bash: alias: ghci2: did not find bash: alias: =: not found bash: alias: ghcis: bash: alias: =: did not find bash: nickname: GB: did not find bash: alias: ghci1: did not get bash : Alias: =: not found
What am I doing wrong? I also tried the command:
~ / .bashrc
Just the .bash_aliases file has something wrong, but I get the same error message.
In addition to this, when I get the command alias
as a result with other aliases:
Surname GHC_HOME = '$ HOME / Development / Bin / nhc 'surname PATH =' $ GHC_HOME / bin: $ {PATH} '
So my nicknames do not get the names I was assigned to them. Is there any way to '=' character or to do something like this to avoid something like this?
P.S. The guide I used to install GHC 7.8.3 is this:
https://gist.github.com/yantonov/10083524
< P> Is there a better way to install GP 7.8.3, or am I incorrectly specifying aliases? Thank you.
You can set this to export , And then the GHCI will work correctly.
You must type above or below ~ / .bashrc
:
Export GHC_HOME = $ HOME / DEVELOPMENT / BIN / GHK Export Path = $ GHC_HOME / bin: $ {PATH}
Then once you have started a new Bash example, You will have access to ghci
(if you change a live , You can also do source ~ / .bashrc
to reload that file, which will bring the required definition.)
Comments
Post a Comment