Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preexec hook works correctly,but no output is printed #33

Open
zgqq opened this issue May 29, 2017 · 5 comments
Open

Preexec hook works correctly,but no output is printed #33

zgqq opened this issue May 29, 2017 · 5 comments
Assignees
Labels

Comments

@zgqq
Copy link

zgqq commented May 29, 2017

  echo $shell_functions "\n" $git_aliases "\n" $shell_aliases | \
    python ${_alias_tips__PLUGIN_DIR}/alias-tips.py $*

This echo doesn't print corresponding alias.

@djui djui changed the title Preexec hook works correctly,but no any output is printed. Preexec hook works correctly,but no output is printed May 29, 2017
@djui djui added the bug label May 29, 2017
@djui djui self-assigned this May 29, 2017
@djui
Copy link
Owner

djui commented May 29, 2017

I assume you did run with with the previous:

  shell_aliases=$(alias)

  shell_functions=$(functions | grep '^[a-zA-Z].\+ () {$')

  echo $shell_functions "\n" $git_aliases "\n" $shell_aliases | \
    python ${_alias_tips__PLUGIN_DIR}/alias-tips.py $*

? Still no output? Could you print echo $(alias) and echo $(functions | grep '^[a-zA-Z].\+ () {$')?

@zgqq
Copy link
Author

zgqq commented May 29, 2017

@djui Thinks for rapid response, still no any output.I can print echo $(alias) and echo $(functions | grep '^[a-zA-Z].\+ () {$')

@djui
Copy link
Owner

djui commented May 29, 2017

Could you post the output here, stripping away any privacy related items?

@cibinmathew
Copy link

cibinmathew commented Apr 16, 2023

@djui

If I print below directly, I get 50+ aliases

```sh
❯ alias
50+ lines of output

I tried both shell_aliases=$(alias) and shell_aliases=$(\alias)

echo $shell_aliases # prints only 2 lines
-='cd -'
..='%

alias for .. is ..='\cd ..', but in above output it is shown as ..='%
if I do unalias .. and then run(It prints few more aliases than earlier). But it stops similarly at another line cd.='%. The real alias behind cd. is cd.='\cd ..'

@cibinmathew
Copy link

@zgqq
In aliases like alias cdup='\cd ..', \c is interpreted differently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants