jonasbn / macaliaser

script for building bash aliases for applications on MacOS
https://jonasbn.github.io/macaliaser/
Artistic License 2.0
2 stars 0 forks source link

Implement a filter configuration #8

Open jonasbn opened 5 years ago

jonasbn commented 5 years ago

I am experiencing issues with Dash.app. macaliaser suggests dash, which is completely okay. But I have implemented a Bash function named dash and it does not look like macaliaser detects functions, so either it needs to detect functions or a filter configuration should be added so suggestions for good aliases can be configured.

Suggestion for format:

"/Applications/Dash.app": "dashapp"
jonasbn commented 2 years ago

zsh has a functions command, which lists all functions, I wonder if bash has something similar

jonasbn commented 2 years ago

bash lists all declared functions, with declare -F

REF: https://stackoverflow.com/questions/4471364/how-do-i-list-the-functions-defined-in-my-shell

Example

jonasbn@silverrocket:~$ declare -F
declare -f __bp_adjust_histcontrol
declare -f __bp_in_prompt_command
declare -f __bp_install
declare -f __bp_install_after_session_init
declare -f __bp_interactive_mode
declare -f __bp_precmd_invoke_cmd
declare -f __bp_preexec_invoke_exec
declare -f __bp_require_not_readonly
declare -f __bp_sanitize_string
declare -f __bp_set_ret_value
declare -f __bp_trim_whitespace
declare -f __fig_post_prompt
declare -f __fig_pre_prompt
declare -f __fig_preexec
declare -f __fig_preexec_preserve_status
declare -f __fig_reset_hooks
declare -f __perlbrew_activate
declare -f __perlbrew_deactivate
declare -f __perlbrew_purify
declare -f __perlbrew_reinit
declare -f __perlbrew_set_env
declare -f __perlbrew_set_path
declare -f fig_osc
declare -f mcfly_prompt_command
declare -f pathadd
declare -f perlbrew