H
Hector
Guest
I recently attempted to create an .alias script to run on calm window manager upon starting Rxvt. I dislike putting the commands in the profile script, however, because I prefer a more modular approach.
Here is what I did:
I created a bash script ~/.alias in my home directory, and then created a symbolic link to said script in $HOME/bin/ called salias. Then I created a small section in ~/.profile that executed salias. Salias is in my search path, so it executes whenever a loginshell is put forth:
This way I get to keep my profile neat and clean, and the executable stays in my bin folder. Caution: make sure you take the adequate test measures before executing outside scripts.
Unfortunately, It appears that salias is generating the relevant commands, but the aliases are staying in the local namespace, and therefore are being destroyed when salias exits. I will try exporting the values with export when I get home. Will keep you updated.
Here is what I did:
I created a bash script ~/.alias in my home directory, and then created a symbolic link to said script in $HOME/bin/ called salias. Then I created a small section in ~/.profile that executed salias. Salias is in my search path, so it executes whenever a loginshell is put forth:
Code:
#!/bin/sh
#.alias file, symlinked to by $PATH/bin/salias.
#pretty basic, but you understand.
alias ds='ls -l'
alias dsa='ls -lsa'
This way I get to keep my profile neat and clean, and the executable stays in my bin folder. Caution: make sure you take the adequate test measures before executing outside scripts.
Unfortunately, It appears that salias is generating the relevant commands, but the aliases are staying in the local namespace, and therefore are being destroyed when salias exits. I will try exporting the values with export when I get home. Will keep you updated.