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

.../profile.d/50-history,sh should not assume bash #3984

Closed
2 tasks done
pillmuncher opened this issue Oct 4, 2024 · 1 comment
Closed
2 tasks done

.../profile.d/50-history,sh should not assume bash #3984

pillmuncher opened this issue Oct 4, 2024 · 1 comment
Labels
Bug Something isn't working Confirmed Issue can be reproduced

Comments

@pillmuncher
Copy link

pillmuncher commented Oct 4, 2024

Please confirm there isn't an existing open bug report

  • I have searched open bugs for this issue

Summary

I'm using zsh as my shell. When I run $ zsh --login I get this error:

/usr/share/defaults/etc/profile.d/50-history.sh:8: command not found: shopt

This is because this file is part of the bash package and assumes it is only ever sourced by bash, which is not always the case. Here is how it might look like instead:

# Begin /usr/share/defaults/etc/profile.d/50-history.sh

# Append to history file on exit instead of overwrite (parallel terminals)
if [ "$0" == "zsh" ]; then
    setopt APPEND_HISTORY
elif [ "$0" == "bash" ]; then
    shopt -s histappend
fi
…

I only know bash and zsh, so there might be other cases which need handling.

Steps to reproduce

In a terminal run:

$ zsh --login

Expected result

A zsh login shell starts without error.

Actual result

The zsh login shell starts, but prints out this error message:

/usr/share/defaults/etc/profile.d/50-history.sh:8: command not found: shopt

Environment

  • Is system up to date?

Repo

Shannon (stable)

Desktop Environment

Budgie

System details

System:
  Host: niteowl Kernel: 6.10.11-303.current arch: x86_64 bits: 64
  Desktop: Budgie v: 10.9.2 Distro: Solus 4.5 resilience
Machine:
  Type: Desktop Mobo: ASUSTeK model: E3M-ET V5 SERIES v: Rev X.0x
    serial: <superuser required> UEFI: American Megatrends v: 2606
    date: 02/23/2018
CPU:
  Info: quad core Intel Xeon E3-1270 v6 [MT MCP] speed (MHz): avg: 800
    min/max: 800/4200
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Lexa XT [Radeon PRO WX 2100]
    driver: amdgpu v: kernel
  Device-2: Logitech Webcam C270 driver: snd-usb-audio,uvcvideo type: USB
  Display: x11 server: X.Org v: 21.1.13 with: Xwayland v: 24.1.2 driver:
    gpu: amdgpu resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.2.3 renderer: AMD
    Radeon Pro WX 2100 (radeonsi polaris12 LLVM 18.1.8 DRM 3.57
    6.10.11-303.current)
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    driver: r8169
Drives:
  Local Storage: total: 1.42 TiB used: 411.84 GiB (28.3%)
Info:
  Memory: total: 32 GiB available: 31.29 GiB used: 3.59 GiB (11.5%)
  Processes: 329 Uptime: 56m Shell: Zsh inxi: 3.3.36

Other comments

No response

@pillmuncher pillmuncher added the Bug Something isn't working label Oct 4, 2024
@github-project-automation github-project-automation bot moved this to Triage in Solus Oct 4, 2024
@HarveyDevel
Copy link
Member

#3431 addresses this issue.

@HarveyDevel HarveyDevel added the Confirmed Issue can be reproduced label Oct 4, 2024
@github-project-automation github-project-automation bot moved this from Triage to Done in Solus Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Confirmed Issue can be reproduced
Projects
Archived in project
Development

No branches or pull requests

2 participants