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

[snippets] adds newline to snippet content #1415

Closed
rsyring opened this issue Jul 14, 2024 · 3 comments
Closed

[snippets] adds newline to snippet content #1415

rsyring opened this issue Jul 14, 2024 · 3 comments
Assignees
Labels
Stale Stale issue, closing soon.

Comments

@rsyring
Copy link

rsyring commented Jul 14, 2024

Package source

apt packages from software.opensuse.org

App logs

22:44:11 [debg:albert]        Albert version: 0.24.2
22:44:11 [debg:albert]            Build date: Jul  2 2024 09:26:24
22:44:11 [debg:albert]            Qt version: 6.4.2
22:44:11 [debg:albert]             Build ABI: x86_64-little_endian-lp64
22:44:11 [debg:albert]    Build architecture: x86_64
22:44:11 [debg:albert]      CPU architecture: x86_64
22:44:11 [debg:albert]           Kernel type: linux
22:44:11 [debg:albert]        Kernel version: 6.8.0-36-generic
22:44:11 [debg:albert]                    OS: Ubuntu 24.04 LTS
22:44:11 [debg:albert]               OS type: ubuntu
22:44:11 [debg:albert]            OS version: 24.04
22:44:11 [debg:albert]         Platform name: xcb
22:44:11 [debg:albert]            Style name: fusion
22:44:11 [debg:albert]      Available styles: Windows, Fusion
22:44:11 [debg:albert]            Icon theme: gnome
22:44:11 [debg:albert]                  Font: Sans,9,-1,5,400,0,0,0,0,0,0,0,0,0,0,1
22:44:11 [debg:albert]              Language: English
22:44:11 [debg:albert]                Locale: en_US
22:44:11 [debg:albert]       Binary location: /usr/bin/albert
22:44:11 [debg:albert]           Working dir: /home/rsyring/.config/albert/snippets
22:44:11 [debg:albert]             Arguments: albert
22:44:11 [debg:albert] ENVIRONMENT:
22:44:11 [debg:albert]     CLUTTER_IM_MODULE: ibus
22:44:11 [debg:albert]             COLORTERM: truecolor
22:44:11 [debg:albert] DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1000/bus
22:44:11 [debg:albert]       DESKTOP_SESSION: cinnamon
22:44:11 [debg:albert]               DISPLAY: :0
22:44:11 [debg:albert]                EDITOR: vim
22:44:11 [debg:albert]      ENV_CONFIG_SHELL: fish
22:44:11 [debg:albert]         FLAKE8_STRICT: True
22:44:11 [debg:albert]            GDMSESSION: cinnamon
22:44:11 [debg:albert] GIO_LAUNCHED_DESKTOP_FILE: /home/rsyring/.config/autostart/albert.desktop
22:44:11 [debg:albert] GIO_LAUNCHED_DESKTOP_FILE_PID: 2932
22:44:11 [debg:albert] GNOME_DESKTOP_SESSION_ID: this-is-deprecated
22:44:11 [debg:albert]            GNOTE_PATH: /home/rsyring/dropbox/personal/appdata/gnote-shared
22:44:11 [debg:albert]                GPGKEY: 3B20DE2B
22:44:11 [debg:albert]        GPG_AGENT_INFO: /run/user/1000/gnupg/S.gpg-agent:0:1
22:44:11 [debg:albert]          GTK3_MODULES: xapp-gtk3-module
22:44:11 [debg:albert]         GTK_IM_MODULE: ibus
22:44:11 [debg:albert]                  HOME: /home/rsyring
22:44:11 [debg:albert]                  LANG: en_US.UTF-8
22:44:11 [debg:albert]              LANGUAGE: en
22:44:11 [debg:albert]               LOGNAME: rsyring
22:44:11 [debg:albert]             LS_COLORS: :ow=01;33
22:44:11 [debg:albert]            MISE_SHELL: fish
22:44:11 [debg:albert]                  PATH: /home/rsyring/.local/share/mise/installs/python/3.12/bin:/home/rsyring/.local/share/mise/installs/starship/latest/bin:/shared/apps/cargo/bin:/home/rsyring/bin:/home/rsyring/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
22:44:11 [debg:albert]                   PWD: /home/rsyring/shortcuts/snippets
22:44:11 [debg:albert]      QT_ACCESSIBILITY: 1
22:44:11 [debg:albert]          QT_IM_MODULE: ibus
22:44:11 [debg:albert]      QT_LOGGING_RULES: albert*=true
22:44:11 [debg:albert]       SESSION_MANAGER: local/meld:@/tmp/.ICE-unix/2517,unix/meld:/tmp/.ICE-unix/2517
22:44:11 [debg:albert]                 SHELL: /bin/bash
22:44:11 [debg:albert]                 SHLVL: 1
22:44:11 [debg:albert]                  TERM: xterm-256color
22:44:11 [debg:albert]                  USER: rsyring
22:44:11 [debg:albert]                VISUAL: vim
22:44:11 [debg:albert]           VTE_VERSION: 7600
22:44:11 [debg:albert]            XAUTHORITY: /home/rsyring/.Xauthority
22:44:11 [debg:albert]       XDG_CONFIG_DIRS: /etc/xdg/xdg-cinnamon:/etc/xdg
22:44:11 [debg:albert]   XDG_CURRENT_DESKTOP: X-Cinnamon
22:44:11 [debg:albert]         XDG_DATA_DIRS: /usr/share/gnome:/usr/share/cinnamon:/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop
22:44:11 [debg:albert]  XDG_GREETER_DATA_DIR: /var/lib/lightdm-data/rsyring
22:44:11 [debg:albert]       XDG_RUNTIME_DIR: /run/user/1000
22:44:11 [debg:albert]              XDG_SEAT: seat0
22:44:11 [debg:albert]         XDG_SEAT_PATH: /org/freedesktop/DisplayManager/Seat0
22:44:11 [debg:albert]     XDG_SESSION_CLASS: user
22:44:11 [debg:albert]   XDG_SESSION_DESKTOP: cinnamon
22:44:11 [debg:albert]        XDG_SESSION_ID: c2
22:44:11 [debg:albert]      XDG_SESSION_PATH: /org/freedesktop/DisplayManager/Session0
22:44:11 [debg:albert]      XDG_SESSION_TYPE: x11
22:44:11 [debg:albert] Checking for a running instance…
22:44:11 [info:albert] There is another instance of albert running.

Current Behavior

I have a one line snippet:

 ❯ wc -l  ~/.config/albert/snippets/tailscale\ net.txt
1 /home/rsyring/.config/albert/snippets/tailscale net.txt

But when selecting the snippet in albert and pasting it, I get a newline at the end.

Expected Behavior

I'd expect to get the exact content of the snippet instead of the content plus a newline.

Anything else?

No response

@ManuelSchneid3r ManuelSchneid3r added the Stale Stale issue, closing soon. label Jul 14, 2024
@ManuelSchneid3r
Copy link
Member

ManuelSchneid3r commented Jul 15, 2024

Okay i dont know how this happened. I did not close this one intentionally.

However did you check if your files really dont contain newlines (eg using xxd)?

I struggle to find an editor that does not do some auto formation before saving

@ManuelSchneid3r
Copy link
Member

Found out that binary vim (vim -b) and :set noeol helps

@rsyring
Copy link
Author

rsyring commented Jul 15, 2024

You are right, there was a newline in the snippet file even though I tried two different methods to save the file without adding a newline. :)

Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Stale issue, closing soon.
Development

No branches or pull requests

2 participants