dm
changeset 2 11c4ec7423de
parent 1 9d965b78f426
child 3 5b5abb696426
equal deleted inserted replaced
1:9d965b78f426 2:11c4ec7423de
    18 # You should have received a copy of the GNU General Public License
    18 # You should have received a copy of the GNU General Public License
    19 # along with this program; if not, write to the Free Software
    19 # along with this program; if not, write to the Free Software
    20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21 #
    21 #
    22 # Instructions:
    22 # Instructions:
    23 # 'dm' will manage a list of id-directory. 'dmcd' will allow the current shell to
    23 # 'dm' will manage a list of id-directory. 'dmcd' will allow the current shell
    24 # change to the directory given by 'id'.
    24 # to change to the directory given by 'id'.
    25 #
    25 #
    26 # Examples:
    26 # Examples:
    27 #  $ dm 1 /tmp   # Adds the id '1' for /tmp
    27 #  $ dm 1 /tmp   # Adds the id '1' for /tmp
    28 #  $ dm 2 .      # Adds the id '2' for the current dir
    28 #  $ dm 2 .      # Adds the id '2' for the current dir
    29 #  $ dmcd 1      # Goes to /tmp
    29 #  $ dmcd 1      # Goes to /tmp
    37 # given by "dm -h" in your shell. Put it in your bashrc or
    37 # given by "dm -h" in your shell. Put it in your bashrc or
    38 # a file like that.
    38 # a file like that.
    39 #
    39 #
    40 # Your directory database is stored in ~/.dm .
    40 # Your directory database is stored in ~/.dm .
    41 
    41 
    42 
       
    43 function showdirs
    42 function showdirs
    44 {
    43 {
    45     if [ -f ~/.dm ] ; then
    44     if [ -f ~/.dm ] ; then
    46         cat ~/.dm | sort -n
    45         cat ~/.dm | sort
    47     fi
    46     fi
    48 }
    47 }
    49 
    48 
    50 function testdir
    49 function testdir
    51 {
    50 {