bash - Failure with creating custom alias in ubuntu 14.04 -
i running ubuntu 14.04 on computer , trying create custom alias can run ghc (haskell compiler). tried editing .bash_aliases file , added commands:
alias ghci1 = 'ghc_home=$home/development/bin/ghc' alias ghci2 = 'path=$ghc_home/bin:${path}' alias ghcis = 'ghci'
the whole point of doing because installed ghc 7.8.3 , everytime want open ghci have write downwards first 2 commands, otherwise error ghc not installed on computer.
when open terminal after having edited .bash_aliases file messages:
bash: alias: ghci1: not found bash: alias: =: not found bash: alias: ghci2: not found bash: alias: =: not found bash: alias: ghcis: not found bash: alias: =: not found bash: alias: ghci: not found bash: alias: ghci1: not found bash: alias: =: not found
what doing wrong? tried command:
. ~/.bashrc
just in case there wrong .bash_aliases file same error message.
also when type in command alias
result along other aliases this:
alias ghc_home='$home/development/bin/ghc' alias path='$ghc_home/bin:${path}'
so aliases don't names assigned them. there way somehow escape '=' character or work?
p.s. guide used install ghc 7.8.3 this:
https://gist.github.com/yantonov/10083524
so there maybe improve way install ghc 7.8.3, or assigning aliases in wrong way?
thank you.
you should using export built-in command in bash set these up, , ghci work correctly.
at top or bottom of ~/.bashrc
should write:
export ghc_home=$home/development/bin/ghc export path=$ghc_home/bin:${path}
then 1 time have started new bash instance have access ghci
. (if need live change, can source ~/.bashrc
reload file bash, bring needed definitions.)
bash haskell ubuntu-14.04
No comments:
Post a Comment