bash command line editing

来源:互联网 发布:网络教育晋职称能用吗 编辑:程序博客网 时间:2024/05/21 22:42

M = metakey = left alt

 

undo ^_  (^x needs another character to do anything)

revert/clear line M-r

clear screen ^l

history manipulations

beginning of history M-<

end of history M->

revsere search ^r

forward search ^s

moving in line

go to head ^a

go to end ^e

next word M-f

previous word M-b

set mark ^@

go to mark ^xx

go to character ^]

go back to character M-^]

changing in line

exchange previous two characters ^t

exchange previous two words M-t

upcase word M-u

downcase word M-l

cutting & pasting

remove to the end of line ^k

remove to the head of line ^u (^x-DEL not working)

remove to the end of word M-d

remove to the head of word ^w (M-DEL not working)

yank (the top of the kill-ring) ^y

rotate the kill-ring (if last command is yank or this itself) M-y

yank last arg M-. , or M-_

macros

start keyboard macro recording ^x(

stop keyboard macro recording ^x)

play macro ^xe

原创粉丝点击