User talk:Grufo
pacman tips
1. Why do you think you need to change newlines to spaces?
2. I think that Archers are capable of creating trivial aliases and functions themselves.
-- Karol (talk) 19:24, 21 November 2012 (UTC)
- @Karol
- 1. Because it doesn't work with newlines in an "alias" context. Try yourself!
- 2. I'm an "Archer" and know Bash, but I spent ten minutes to write that line. Do you think that a Wiki should tell everyone: «Ok, guy, find yourself the solution»?
- --Grufo [ contribs | talk ] 19:39, 21 November 2012 (UTC)
- 1. Works here:
$ pacman -Qqdt firefox flashplugin $ pacro checking dependencies... Targets (7): Name Old Version New Version Net Change libevent 2.0.20-1 -1,79 MiB libnotify 0.7.5-1 -0,26 MiB mime-types 8-1 -0,05 MiB mozilla-common 1.4-3 -0,02 MiB nss 3.14-1 -5,70 MiB firefox 16.0.2-1 -21,52 MiB flashplugin 11.2.202.251-1 -20,83 MiB Total Removed Size: 50,16 MiB Do you want to remove these packages? [Y/n] n $ type pacro pacro is aliased to `/usr/bin/pacman -Qtdq > /dev/null && sudo /usr/bin/pacman -Rs $(/usr/bin/pacman -Qtdq)'
- (I'm watching this page, so it's not necessary to edit my talk page to notify my of your response, but thanks anyway) -- Karol (talk) 20:21, 21 November 2012 (UTC)
- 1. Works here:
- Your solution with newlines doesn't work on my computer :-( It works fine only with spaces.
- I think that, since in a bash context a separator is a space and not a newline, an "universal" solution is to use spaces instead of newlines. But this is my opinion.--Grufo [ contribs | talk ] 20:30, 21 November 2012 (UTC)
- Do you get any errors when running
sudo pacman -Rs $(pacman -Qqdt)
in the terminal? What's the output ofecho "$IFS" | cat -te
? If you substitute the sed part withtr '\n' ' '
, does it still work for you? -- Karol (talk) 21:09, 21 November 2012 (UTC)- @Karol
- > Do you get any errors when running
sudo pacman -Rs $(pacman -Qqdt)
in the terminal? - No, out of alias context
sudo pacman -Rs $(pacman -Qqdt)
works - > What's the output of
echo "$IFS" | cat -te
? - What is
$IFS
?? However the output is: ^I$ $
- > If you substitute the sed part with
tr '\n' ' '
, does it still work for you? - Substituting the sed part with
tr '\n' ' '
it works fine! - --Grufo [ contribs | talk ] 19:54, 22 November 2012 (UTC)
- IFS is the internal field separator, the default is a space, tab or newline. Not sure if you copied it verbatim, but the space seems to be missing:
$ IFS=$' \t\n' $ echo "$IFS" | cat -te ^I$ $
- That shouldn't matter though, as the problem is with the newlines and they're included in your IFS (it's the single '$' on the second line), as expected.
- I'd like to sort this out, so please open a thread on the forums. Please provide sample output when using the alias.
- Using either single quotes or double quotes and escaping the '$' in the alias both work fine here. -- Karol (talk) 22:31, 22 November 2012 (UTC)
- IFS is the internal field separator, the default is a space, tab or newline. Not sure if you copied it verbatim, but the space seems to be missing:
- Do you get any errors when running
- Has this been solved or silently forgotten? -- Lahwaacz (talk) 19:20, 17 February 2014 (UTC)
Colors for "command not found"
Hi, I'd like to talk in Talk:Bash#Colors for "command not found" about [1]. -- Kynikos (talk) 03:00, 4 December 2013 (UTC)
pacman tips again
Hi, I'd like to ask for your opinion about this tip: (un)locking the pacman database manually is certainly hackish and can conflict with normal pacman operation. Therefore, this "tip" is IMO suitable at most for a troubleshooting section, not as a regular pacman tip. -- Lahwaacz (talk) 18:59, 17 February 2014 (UTC)
- I simply guess that who edits his own
.bashrc
in order to put somepaclock
/pacunlock
commands knows perfectly the consequences of calling them and also confirming them with someroot
password. Also, it is a very common accident for who regularly use gnome-settings-daemon-updates to turn off the computer during the regular db update operation performed by packagekit. Statistically speaking, I must launch thatpacunlock
command at least once every two months. But, maybe, we could put some warning in a comment within our.bashrc
sample file… --Grufo [ contribs | talk ] 03:10, 18 February 2014 (UTC)
- I see that there's much more to this than just a simple comment, for good readability it would be best to start a new (sub)section and keep these two aliases in a separate code block. -- Lahwaacz (talk) 07:07, 18 February 2014 (UTC)
- Done ;) --Grufo [ contribs | talk ] 14:00, 18 February 2014 (UTC)
- Well, I thought that you would also include why it can be useful... -- Lahwaacz (talk) 14:28, 18 February 2014 (UTC)
- Also done! :P --Grufo [ contribs | talk ] 15:47, 18 February 2014 (UTC)
- Thanks! -- Lahwaacz (talk) 19:54, 18 February 2014 (UTC)
AUR helpers
I'm not sure what you were thinking when you added [2]. Not only does it ignore the note on discussing changes, it makes people completely bypass the AUR wiki article by letting them copy paste an ad-hoc AUR helper just to install another one. I've reverted the change. -- Alad (talk) 07:31, 17 September 2024 (UTC)
- Hi Alad. I am sorry for bypassing the note on discussing the changes, I truly missed it. As for the motivation behind a rudimentary AUR helper function: it regularly happened back in the days with
package-query
, and it still happens today with many AUR helpers: whenlibalpm
gets updated they break. And so a simple way to download and install the AUR helper itself does come in handy. The reason whyparu
appears in the example is just that this problem happened very recently exactly withparu
. I don't even useparu
, a friend of mine does, and so all I wanted was to simplify other people's lives. --Grufo [ contribs | talk ] 15:08, 17 September 2024 (UTC)