0

My dmenu doesn't recognise aliases. I've found a solution but I can't seem to figure out what he is trying to say.

Glorfindel
  • 971
  • 3
  • 13
  • 20
dope
  • 128

1 Answers1

4
  1. dmenu as such does not recognize aliases, files, desktop files, etc. It only works with what you feed to it. Could be "Yes", "No", "Maybe". Could be a list of email addresses. Could be a list of programs. dmenu comes installed with a script dmenu_path, which is actually a script.

    Execute cat $(which dmenu_run) to see the one-liner they use. Separated by the pipe symbols, you see the three steps:

    1. Generate a list to standard output;
    2. Pipe that list to dmenu, which shows the list as choices. dmenu spits out the choice you made to standard output, and
    3. something is done with the output. For 1., a second script dmenu_path is called that creates the list: use cat $(which dmenu_path) to study that script.
  2. Aliases are not intended to use in scripts. Try making a bash script: the script will not find your alias. See here for a plethora of options on how you can use what you defined in an alias in a script.

Zanna
  • 70,465
vanadium
  • 88,010