Home / LinuxBash / My Linux g Command
A script that allows me to go to a directory using an alias - eg: gbin
to go to my bin
directory.
I name this script g
.
It contains an alias ge
which edits the script and an alias g
which lists all the go to aliases.
The script needs to be sourced
to set the aliases - eg: source g
(or . g
). I add this to my .bashrc
. I also make sure the location of g
is in my path so I can re-source it after any changes using . g
(with no path).
alias ge="gvim /c/MJN/github/bash/g; echo; echo REMEMBER . g; echo"
alias g="alias | egrep 'alias g.*=' | sed 's/alias //; s/=/ = /; s/\(..........\)[^=]*\(.*\)/\1\2/; /^g /d'"
alias gbash="cd /c/MJN/github/bash; ls"
alias gbin="cd /c/MJN/gdrive/bin; ls"
alias gcli="cd /c/MJN/github/cli-builder; ls"
This page was generated by GitHub Pages. Page last modified: 22/02/28 15:48