Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
"find in files" - gibts da was Komfortables? (gerne ncurses)
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
doedel
Guru
Guru


Joined: 05 Feb 2006
Posts: 579
Location: Denmark

PostPosted: Sun Oct 07, 2018 6:46 pm    Post subject: "find in files" - gibts da was Komfortables? (gern Reply with quote

Hi,

ich bin gerade dabei an einem recht alten x86-compiler an der c-library zu basteln. Nun ist das recht umständlich...

z.B. ich möchte schauen ob die Funktion foo schon drin ist, wenn nicht erstellen:
Code:
 $ grep -R foo .
$EDITOR <ergebnis>
$EDITOR <passender header>
$EDITOR Makefile


Da häng ich teilweise länger am durchhangeln als an einer einfachen string-funktion...

Ich stelle mir da ein Tool vor, welches z.B. so aussehen würde:
* ncurses (was anderes geht auch, wäre mir aber lieb)
* zweigeteiltes fenster + Eingabemaske
* ich gebe Suchwort ein
* Eine Hälfte vom Fenster zeigt Dateiliste an (wenn gefunden)
* Andere Hälfte zeigt Vorschau
* "Enter" auf die Datei in der Liste führt z.b. "kate -b $DATEI" aus um ein neues Tab in kate zu bekommen.

Weiss da einer von euch was, was eventuell in diese Richtung geht?

Schonmal Danke im Voraus :)
Nils
_________________
1 ha == 1 Hekto-Ar == 1 Hektar
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2272
Location: My own world! I and Gentoo!

PostPosted: Mon Oct 08, 2018 8:14 am    Post subject: Reply with quote

vll kann "ranger" etwas entsprechendes...
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
doedel
Guru
Guru


Joined: 05 Feb 2006
Posts: 579
Location: Denmark

PostPosted: Mon Oct 08, 2018 8:37 pm    Post subject: Reply with quote

WOW ranger entspricht ziemlich genau dem, was ich mir vorstelle. Leider habe ich noch keine passende funktion für "grep -R foo ." gefunden und "kate -b datei" blockiert ranger. Er geht erst wieder auf, wenn kate beendet ist.

Ich denke das zweite Problem kann ich mit screen oder tmux lösen - vielleicht reicht ja sogar ein kleines script, welches kate nur mit & in Hintergrund schickt.

Ranger macht es schonmal deutlich angenehmer, danke :)
_________________
1 ha == 1 Hekto-Ar == 1 Hektar
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum