Results 1 to 5 of 5

Thread: A weird alias issue

  1. #1
    Join Date
    2022-Jul
    Posts
    1

    A weird alias issue

    Greeting,

    I have a file /home/<user>/.aliases

    #! /bin/bash

    alias hid='ls -d .* --color=auto'
    alias cd..='cd ..'
    alias ll='ls -l'

    After .bashrc runs (which calls .aliases) this is the behavior I get.

    dmcclure@catspaw:~$ ll
    ll: command not found
    dmcclure@catspaw:~$ hid
    . .bully .gnome .mozilla .steam .Xauthority
    .. .BurpSuite .gnupg .msf4 .steampath .xscreensaver
    .aliases .cache .hplip .openoffice .steampid .xsession-errors
    .armitage .config .ICEauthority .paradoxlauncher .sudo_as_admin_successful .xsession-errors.old
    .armitage.prop .dbus .icons .pki .thunderbird .zshrc
    .bash_history .dmrc .java .profile .viminfo
    .bash_logout .face .lesshst .pulse-cookie .vnc
    .bashrc .face.icon .local .putty .wget-hsts
    .bashrc.original .fltk '.~lock.Group notes for the week of February 27th.odt#' .ssh .wingpro8
    dmcclure@catspaw:~$ cd..
    cd..: command not found
    dmcclure@catspaw:~$ alias cd..='cd ..'
    dmcclure@catspaw:~$ cd..
    dmcclure@catspaw:/home$

    Any ideas why the cd.. alias fails and kills the rest of the aliases?

  2. #2
    Join Date
    2021-May
    Location
    UK
    Posts
    784
    just put any aliases you want to use in your .bashrc file or .zshrc file themselves, that's why its failing.

    try..

    # my aliases
    alias cd1='cd ..'
    alias cd2='cd ../..'
    alias cd3='cd ../../..'

    you get the idea lol

    If you really want to keep your 'extra file' approach then don't forget to add a line on the end to 'trigger' your aliases in the shell;

    source ./.bashrc

  3. #3
    Join Date
    2020-Aug
    Posts
    35
    I usually compile my code with my databases connected with a logical name, but for the moment I'm having to connect them as aliases for something.


    I have code that does this:


    FOR EACH ChargeRate WHERE


    ChargeRate.PriceListKey = PriceList.PriceListKey AND
    ChargeRate.ChargeBandKey = ChargeBand.ChargeBandKey NO-LOCK.


    FIND ICMAS.BlockRange
    WHERE ICMAS.BlockRange.BlockRangeKey = ICMAs.ChargeRate.BlockRangeKey NO-LOCK NO-ERROR.


    When I compile with a logical dbname of ICMAS is compiles fine, but when I try and compile with aliases I get


    ** Missing FOR, FIND or CREATE for a table with BlockRangeKey in current block. (232)


    If I qualify the ChargeRate for each with ICMAS. then it also compiles ok.


    Regrettably, I have about 250 pieces of code showcasing this archery pick, and rectifying them currently isn't feasible (though it might be an interesting project for a minion in the future!).

    Short of connecting with the right logical dbname, is there anything I can do to get my alias compile to work properly?
    Last edited by miafrance; 2023-12-26 at 04:18.

  4. #4
    Join Date
    2021-May
    Location
    UK
    Posts
    784
    FIND ICMAS.BlockRange
    WHERE ICMAS.BlockRange.BlockRangeKey = ICMAs.ChargeRate.BlockRangeKey NO-LOCK NO-ERROR.

    shouldn't that be ICMAS after the = and not ICMAs and no full stop after NO-LOCK NO-ERROR



  5. #5
    Join Date
    2020-Aug
    Posts
    35
    Quote Originally Posted by Fred Sheehan View Post
    FIND ICMAS.BlockRange
    WHERE ICMAS.BlockRange.BlockRangeKey = ICMAs.ChargeRate.BlockRangeKey NO-LOCK NO-ERROR.

    shouldn't that be ICMAS after the
    garage flooring McAllen= and not ICMAs and no full stop after NO-LOCK NO-ERROR


    thank you so much for your suggestion really helpful for me
    Last edited by miafrance; 2023-02-21 at 10:51.

Similar Threads

  1. Weird Xfce issue.
    By roro00 in forum TroubleShooting Archive
    Replies: 1
    Last Post: 2022-01-20, 12:29
  2. Working on weird USB issue
    By quarinteen in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2017-02-05, 18:44

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •