8000 fix(dotfiles): fish alias import by ellie · Pull Request #1972 · atuinsh/atuin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

fix(dotfiles): fish alias import #1972

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

Merged
merged 1 commit into from
Apr 22, 2024
Merged

fix(dotfiles): fish alias import #1972

merged 1 commit into from
Apr 22, 2024

Conversation

ellie
Copy link
Member
@ellie ellie commented Apr 22, 2024

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

@ellie ellie force-pushed the ellie/fish-import-fix branch from b34f7e0 to 6c9b6ea Compare April 22, 2024 13:23
@ellie ellie merged commit 18f33b8 into main Apr 22, 2024
@ellie ellie deleted the ellie/fish-import-fix branch April 22, 2024 13:27
@rigrig
Copy link
Contributor
rigrig commented Apr 22, 2024

Thanks! But it's still a bit broken: spaces are replaced with =:

$ alias
alias please doas
alias x 'exa --icons --git --classify --group-directories-first'

$ atuin dotfiles alias import
Importing please=doas
Importing x='exa=--icons=--git=--classify=--group-directories-first'

$ atuin dotfiles alias list
please=doas
x='exa=--icons=--git=--classify=--group-directories-first'

@ellie
Copy link
Member Author
ellie commented Apr 22, 2024

Ah, that's embarassing 🤦‍♀️

Fix in #1974. Sorry about that, should be good now.

@rigrig
Copy link
Contributor
rigrig commented Apr 22, 2024

Yups, parsing works ok now! 🎉

@rigrig
Copy link
Contributor
rigrig commented Apr 22, 2024

Sorry, cheered too soon: it's now generating a bunch of errors on shell start :-(

alias: -o: unknown option
alias: expected <= 2 arguments; got 3
alias: -u: unknown option
alias: expected <= 2 arguments; got 3
alias: --color=auto: unknown option
alias: -e: unknown option
alias: -e: unknown option
alias: -e: unknown option
alias: -p: unknown option
alias: -p: unknown option
alias: -p: unknown option
alias: -p: unknown option
alias: --autoremove: unknown option
alias: --recursive: unknown option
alias: --tree: unknown option
alias: --brief: unknown option
alias: expected <= 2 arguments; got 3
alias: expected <= 2 arguments; got 3
alias: expected <= 2 arguments; got 3
alias: --icons: unknown option
alias: -a: unknown option
alias: --icons: unknown option
alias: --no-mtime: unknown option

From these aliases:

$ atuin dotfiles alias list
config='/usr/bin/git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME'
docker-vabo='docker compose -p vabo -f /home/richard/src/php/vabo/ontwikkel/docker/docker compose.yml'
exa='exa --icons --level=2 --git --header'
fgrep='fgrep --color=auto'
gcm='git checkout master && git pull'
gfa='git fetch --all --prune --tags'
git_push_skip_ci='git push -o ci.skip'
gsu='git submodule update'
idl='python3 ~/src/instagram-media-downloader/instagram.py -u'
install='please apt install'
ip='ip --color=auto'
please=doas
po-artisan='docker compose exec -e PHP_IDE_CONFIG="serverName=po.test" beheer-72 php /project/beheer/artisan'
po-make='docker compose exec -e PHP_IDE_CONFIG="serverName=po.test" beheer-72 make'
po-run='docker compose exec -e PHP_IDE_CONFIG="serverName=po.test" beheer-72'
po2-artisan='docker compose -p po2 exec -e PHP_IDE_CONFIG="serverName=127.0.0.1" web php ./artisan'
po2-format='docker compose -p po2 exec web composer run format'
po2-run='docker compose -p po2 exec -e PHP_IDE_CONFIG="serverName=127.0.0.1" web'
po2-run-as-root='docker compose -p po2 exec -u root:root -e PHP_IDE_CONFIG="serverName=127.0.0.1" web'
remove='please apt purge --autoremove'
rsync='rsync --recursive --partial --progress --human-readable --info=progress2'
tree='exa --tree -L3 --classify --git --icons  --group-directories-first'
uc='unicode --brief --max (math (tput lines) - 5) --regex'
update-bangle='ssh berilia "cd /var/www/BangleApps/bin/ && git pull && git submodule update && ./publish.sh"'
update-nella='ssh nella ./dockers/update-all.sh'
which=command
wine32='WINEARCH=win32 WINEPREFIX=$HOME/.wine32 wine'
x='exa --icons --git --classify --group-directories-first'
xa='x -a'
xdebug='export XDEBUG_CONFIG="remote_enable=1 remote_mode=req remote_port=9000 remote_host=127.0.0.1 remote_connect_back=0"'
xl='exa --icons --git --classify --long --header  --group-directories-first'
ydl='youtube-dl --no-mtime --prefer-free-formats --audio-format opus --merge-output-format mp4'

@ellie
Copy link
Member Author
ellie commented Apr 22, 2024

Does ~/.local/share/atuin/dotfiles/cache/aliases.fish look correct?

@rigrig
Copy link
Contributor
rigrig commented Apr 22, 2024

Looks like the opening/closing quotes got doubled for all aliases containing spaces:

alias config=''/usr/bin/git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME''
alias docker-vabo=''docker compose -p vabo -f /home/richard/src/php/vabo/ontwikkel/docker/docker compose.yml''
alias exa=''exa --icons --level=2 --git --header''
alias fgrep=''fgrep --color=auto''
alias gcm=''git checkout master && git pull''
alias gfa=''git fetch --all --prune --tags''
alias git_push_skip_ci=''git push -o ci.skip''
alias gsu=''git submodule update''
alias idl=''python3 ~/src/instagram-media-downloader/instagram.py -u''
alias install=''please apt install''
alias ip=''ip --color=auto''
alias please='doas'
alias po-artisan=''docker compose exec -e PHP_IDE_CONFIG="serverName=po.test" beheer-72 php /project/beheer/artisan''
alias po-make=''docker compose exec -e PHP_IDE_CONFIG="serverName=po.test" beheer-72 make''
alias po-run=''docker compose exec -e PHP_IDE_CONFIG="serverName=po.test" beheer-72''
alias po2-artisan=''docker compose -p po2 exec -e PHP_IDE_CONFIG="serverName=127.0.0.1" web php ./artisan''
alias po2-format=''docker compose -p po2 exec web composer run format''
alias po2-run=''docker compose -p po2 exec -e PHP_IDE_CONFIG="serverName=127.0.0.1" web''
alias po2-run-as-root=''docker compose -p po2 exec -u root:root -e PHP_IDE_CONFIG="serverName=127.0.0.1" web''
alias remove=''please apt purge --autoremove''
alias rsync=''rsync --recursive --partial --progress --human-readable --info=progress2''
alias tree=''exa --tree -L3 --classify --git --icons  --group-directories-first''
alias uc=''unicode --brief --max (math (tput lines) - 5) --regex''
alias update-bangle=''ssh berilia "cd /var/www/BangleApps/bin/ && git pull && git submodule update && ./publish.sh"''
alias update-nella=''ssh nella ./dockers/update-all.sh''
alias which='command'
alias wine32=''WINEARCH=win32 WINEPREFIX=$HOME/.wine32 wine''
alias x=''exa --icons --git --classify --group-directories-first''
alias xa=''x -a''
alias xdebug=''export XDEBUG_CONFIG="remote_enable=1 remote_mode=req remote_port=9000 remote_host=127.0.0.1 remote_connect_back=0"''
alias xl=''exa --icons --git --classify --long --header  --group-directories-first''
alias ydl=''youtube-dl --no-mtime --prefer-free-formats --audio-format opus --merge-output-format mp4''

@rigrig
Copy link
Contributor
rigrig commented Apr 24, 2024

For the record: quoting was fixed with bf88b42, fish aliases seem to work properly now 🎉

@ellie
Copy link
Member Author
ellie commented Apr 24, 2024

Wooo! Glad it's sorted 🎉

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

Successfully merging this pull request may close these issues.

2 participants
0