Add -print-last-dir and -print-selection flags (#1402)
* Add `-print-last-dir` and `-print-selection` flags * Add shell completions * Update `lfcd.sh` example to use new flag
This commit is contained in:
1 parent
63d21b5a3e
commit
6aa3d2aa18
10 files changed
+50
-26
No files matched your search
@@ -69,6 +69,16 @@ func run() {
|
||||
if gSelectionPath != "" && len(app.selectionOut) > 0 {
|
||||
writeSelection(gSelectionPath, app.selectionOut)
|
||||
}
|
||||
|
||||
if gPrintLastDir {
|
||||
fmt.Println(app.nav.currDir().path)
|
||||
}
|
||||
|
||||
if gPrintSelection && len(app.selectionOut) > 0 {
|
||||
for _, file := range app.selectionOut {
|
||||
fmt.Println(file)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func writeLastDir(filename string, lastDir string) {
|
||||
|
||||
Reference in new issue
Block a user