cleanup
This commit is contained in:
1 parent
e7f5f90b0c
commit
eedcc258c2
4 files changed
+39
-36
No files matched your search
+10
-7
@@ -1,12 +1,15 @@
|
|||||||
|
# Autocompletion for tcsh shell.
|
||||||
#
|
#
|
||||||
# For using these completions you must load it from .tcshrc
|
# You need to either copy the content of this file to your shell rc file
|
||||||
|
# (e.g. ~/.tcshrc) or source this file directly:
|
||||||
#
|
#
|
||||||
# source ~/.config/lf/lf.csh
|
# set LF_COMPLETE = "/path/to/lf.csh"
|
||||||
|
# if ( -f "$LF_COMPLETE" ) then
|
||||||
|
# source "$LF_COMPLETE"
|
||||||
|
# endif
|
||||||
#
|
#
|
||||||
set lf_args = "-command -cpuprofile -doc --help -last-dir-path -memprofile -remote -selection-path -server -version --version"
|
|
||||||
|
|
||||||
uncomplete lf
|
set LF_ARGS = "-command -cpuprofile -doc -last-dir-path -memprofile -remote -selection-path -server -version -help "
|
||||||
uncomplete lfcd
|
|
||||||
|
|
||||||
complete lf "C/-*/(${lf_args})/"
|
complete lf "C/-*/(${LF_ARGS})/"
|
||||||
complete lfcd "C/-*/(${lf_args})/"
|
complete lfcd "C/-*/(${LF_ARGS})/"
|
||||||
+19
-20
@@ -1,29 +1,28 @@
|
|||||||
#compdef lf
|
#compdef lf
|
||||||
|
|
||||||
# For using these completions you must:
|
# Autocompletion for zsh shell.
|
||||||
# - rename this file to _lf
|
|
||||||
# - add the containing folder to $fpath in .zshrc, like this:
|
|
||||||
# '''
|
|
||||||
# fpath=(/path/to/folder/containing_lf $fpath)
|
|
||||||
# autoload -U compinit
|
|
||||||
# compinit
|
|
||||||
# '''
|
|
||||||
#
|
#
|
||||||
# zsh completions for 'lf'
|
# You need to rename this file to _lf and add containing folder to $fpath in
|
||||||
# automatically generated with http://github.com/RobSis/zsh-completion-generator
|
# ~/.zshrc file:
|
||||||
|
#
|
||||||
|
# fpath=(/path/to/directory/containing/the/file $fpath)
|
||||||
|
# autoload -U compinit
|
||||||
|
# compinit
|
||||||
|
#
|
||||||
|
|
||||||
local arguments
|
local arguments
|
||||||
|
|
||||||
arguments=(
|
arguments=(
|
||||||
'-command[command to execute on client initialization]'
|
'-command[command to execute on client initialization]'
|
||||||
'-cpuprofile[path to the file to write the CPU profile]'
|
'-cpuprofile[path to the file to write the CPU profile]'
|
||||||
'-doc[show documentation]'
|
'-doc[show documentation]'
|
||||||
'-last-dir-path[path to the file to write the last dir on exit (to use for cd)]'
|
'-last-dir-path[path to the file to write the last dir on exit (to use for cd)]'
|
||||||
'-memprofile[path to the file to write the memory profile]'
|
'-memprofile[path to the file to write the memory profile]'
|
||||||
'-remote[send remote command to server]'
|
'-remote[send remote command to server]'
|
||||||
'-selection-path[path to the file to write selected files on open (to use as open file dialog)]'
|
'-selection-path[path to the file to write selected files on open (to use as open file dialog)]'
|
||||||
'-server[start server (automatic)]'
|
'-server[start server (automatic)]'
|
||||||
'-version[show version]'
|
'-version[show version]'
|
||||||
'*:filename:_files'
|
'*:filename:_files'
|
||||||
)
|
)
|
||||||
|
|
||||||
_arguments -s $arguments
|
_arguments -s $arguments
|
||||||
+8
-7
@@ -1,13 +1,14 @@
|
|||||||
# Change working dir in shell to last dir in lf on exit.
|
# Change working dir in tcsh to last dir in lf on exit (adapted from ranger).
|
||||||
#
|
#
|
||||||
# You need to either copy the content of this file to your shell rc file
|
# You need to either copy the content of this file to your shell rc file (e.g.
|
||||||
# (e.g. ~/.tcshrc) or source this file directly:
|
# ~/.tcshrc) or source this file directly:
|
||||||
#
|
#
|
||||||
# setenv LF_HOME "${HOME}/.config/lf"
|
# setenv LF_HOME "${HOME}/.config/lf"
|
||||||
# [ -e "${LF_HOME}/lfcd.csh" ] && source "${LF_HOME}/lfcd.csh"
|
# [ -e "${LF_HOME}/lfcd.csh" ] && source "${LF_HOME}/lfcd.csh"
|
||||||
#
|
#
|
||||||
# You may also like to assign a key to this command:
|
# You may also like to assign a key to this command:
|
||||||
#
|
#
|
||||||
# bindkey -c "^O" lfcd
|
# bindkey -c "^O" lfcd
|
||||||
#
|
#
|
||||||
|
|
||||||
alias lfcd 'set _=`mktemp` && lf -last-dir-path=$_ "\!*" && set _=`cat $_ && rm -f $_` && [ -d "$_" ] && cd "$_"'
|
alias lfcd 'set _=`mktemp` && lf -last-dir-path=$_ "\!*" && set _=`cat $_ && rm -f $_` && [ -d "$_" ] && cd "$_"'
|
||||||
+2
-2
@@ -4,14 +4,14 @@
|
|||||||
#
|
#
|
||||||
# You may also like to assign a key to this command:
|
# You may also like to assign a key to this command:
|
||||||
#
|
#
|
||||||
# You may put this in one of the profiles found in $PROFILE.
|
|
||||||
#
|
|
||||||
# Set-PSReadLineKeyHandler -Chord Ctrl+o -ScriptBlock {
|
# Set-PSReadLineKeyHandler -Chord Ctrl+o -ScriptBlock {
|
||||||
# [Microsoft.PowerShell.PSConsoleReadLine]::RevertLine()
|
# [Microsoft.PowerShell.PSConsoleReadLine]::RevertLine()
|
||||||
# [Microsoft.PowerShell.PSConsoleReadLine]::Insert('lfcd.ps1')
|
# [Microsoft.PowerShell.PSConsoleReadLine]::Insert('lfcd.ps1')
|
||||||
# [Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
|
# [Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
|
# You may put this in one of the profiles found in $PROFILE.
|
||||||
|
#
|
||||||
|
|
||||||
$tmp = [System.IO.Path]::GetTempFileName()
|
$tmp = [System.IO.Path]::GetTempFileName()
|
||||||
lf -last-dir-path="$tmp" $args
|
lf -last-dir-path="$tmp" $args
|
||||||
|
|||||||
Reference in new issue
Block a user