1 |
Hi Anton, |
2 |
|
3 |
thank you very much ! :) |
4 |
|
5 |
Your solution creates the flat-hand-against-my-forehead |
6 |
effect... ;) |
7 |
|
8 |
Of course! Yes! |
9 |
|
10 |
Cheers! |
11 |
Meino |
12 |
|
13 |
|
14 |
|
15 |
On 10/31 07:37, Anton Molyboha wrote: |
16 |
> Hi, Meino |
17 |
> |
18 |
> I'd make a script, sudo_with_rehash: |
19 |
> |
20 |
> sudo "$@" |
21 |
> rehash |
22 |
> |
23 |
> and add to whatever is the equivalent of .bashrc for zsh: |
24 |
> |
25 |
> alias sudo="source sudo_with_rehash" |
26 |
> |
27 |
> Would that work for you? |
28 |
> |
29 |
> Best, |
30 |
> Anton |
31 |
> |
32 |
> On Wed, Oct 31, 2018 at 4:49 AM <tuxic@××××××.de> wrote: |
33 |
> |
34 |
> > Hi, |
35 |
> > |
36 |
> > often I have this scenario: |
37 |
> > I miss an application/script, a setting or something like that. |
38 |
> > To apply the modifikation I becom root from the shell I was using as user. |
39 |
> > I modificate/install or whatever change is needed... |
40 |
> > I CTRL-D back to my user shell. |
41 |
> > |
42 |
> > Now I have to do a "rehash" (I am using zsh) to make the change |
43 |
> > visible/accessible. Sometimes I forget that. |
44 |
> > |
45 |
> > So...is it possible to auto-execute a "rehash" or whatever is needed, |
46 |
> > when the user is comeing back from his alternate life as root? |
47 |
> > |
48 |
> > Thanks a lot for any help in advance! |
49 |
> > Cheers! |
50 |
> > Meino |
51 |
> > |
52 |
> > |
53 |
> > |
54 |
> > |