Skip to content
Alfred workflow for running alias and functions in ~/.bash_profile
PHP Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Bash profile commands.alfredworkflow

Alfred bash profile workflow

This workflow enable Alfred run alias or functions that come from ~/.profile, ~/.zprofile, ~/.bash_profile and ~/my_bash/ (Common bash profile alias and functions template).


Download and install the workflow in alfred.


Type >

The workflow will auto display alias and functions from profiles. E.g. Alfred bash cmd

Add custom comment for alfred to read

You may need to add comment tags for your alias or functions in profiles for alfred to read with following format:

#alfred; command: XXX ; parameters: XXX or 'none', ('none' means no parameter); description: XXX

Where keyword

'command' is alias or function name.
'parameters' is alias or function parameters. If it doesn't have parameters, you need to give 'none'.
'description' is alias or function description.


  1. If there has duplicate alias or function names, Alfred only display first one.
  2. Custom comment tag has higher priority then alias and functions.
  3. Support display recommendations from keyword in camelcase, underscore and hyphen.
  4. Add comment and parameter hint in alias functions as following:
    # Moves a file to the MacOS trash
    # parameters: path (or var: path | none)
    trash () { command mv "$@" ~/.Trash ; }
  5. Can define function parameters as 'parameters:', 'var:', 'parameter'. If function parameter contain 'none', so it will not require to have parameter.
  6. Start with _ for ignoring indexing in alfred. E.g. Inner function.


In workflow source folder, run command:

# display alfred workflow output
php run.php help

# run some tests
php test.php 
You can’t perform that action at this time.