Path: utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!prosys.ai.mit.edu!thomas From: thomas@prosys.ai.mit.edu (Thomas Thyberg) Newsgroups: gnu.bash.bug Subject: Defining alias Message-ID: <8907141107.AA19130@amalthea.prosys.se> Date: 14 Jul 89 11:07:19 GMT Sender: thomas@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 44 Bash version 1.02 SUN 3/60 SUNOS3.5 gcc version 1.35 Hi. There is something I really would like to be able to do in bash and that is to write my alias definitions in my .bashrc something like this: 1: alias \ 'pd= pushd' \ 'ud= popd' \ 'back= cd $OLDPWD' \ etc... or 2: alias \ 'pd =pushd' \ 'ud =popd' \ 'back =cd $OLDPWD' \ etc... to make it more readable (I think it gets more readably anyway). The problem is this; The second version doesn't work and in the first the leading white space in the value part of a definition ends up in the alias definition. eg. bash$ alias pd alias pd=" pushd" If you allow 1 than I think that could be fixed by stripping the leading spaces of 'value' before calling add_alias in alias_builtin. But I would prefer 2, which probably needs more work. If this isn't the way of defining ones aliases, please tell me how! BTW, Thanks for doing bash! The best shell I have ever used. -------------------------------------------------------------------- Thomas Thyberg INET : thomas@prosys.se Programsystem AB UUCP : ...!{uunet,mcvax}!sunic!prosys!thomas Teknikringen 2A PHONE: +46 (0)13 21 40 40 S-583 30 Linkoping, Sweden FAX : +46 (0)13 21 36 35